summaryrefslogtreecommitdiff
path: root/scripts/run-ptp.sh
blob: 0f99270bb4f25dc614267703ac8a8664bbe60973 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

. scripts/lava-common.sh

# stop the default service
systemctl stop ptp4l
iface=$(find_vland_iface)

echo "[global]" > testptp.cfg
echo "[$iface]" >> testptp.cfg
echo "#" >> testptp.cfg
echo "transportSpecific 1" >> testptp.cfg
# Run all as masters and let them select
ptp4l -f testptp.cfg -i "$iface" &
# Sync system clock to PTP hardware clock
phc2sys -s "$iface" -s CLOCK_REALTIME -w &