21 lines
258 B
Plaintext
21 lines
258 B
Plaintext
start()
|
|
{
|
|
flags=''
|
|
|
|
if [ -n "$cfg_ptpd_master" ]; then
|
|
flags='-gW'
|
|
else
|
|
flags='-g'
|
|
fi
|
|
|
|
/usr/bin/ptpd2 $flags -b "$cfg_ptpd_interface"
|
|
}
|
|
|
|
stop()
|
|
{
|
|
if [ -c /dev/rtc0 ]; then
|
|
hwclock -w
|
|
fi
|
|
killall ptpd2
|
|
}
|