1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-02-23 03:05:40 +00:00
Files
operating-system/buildroot/package/linuxptp/S65linuxptp
Pascal Vizeli 41d3f59002 Update Buildroot to 2019.02.3 (#415)
* Update Buildroot to 2019-02.3

* Fix enter script

* Update ova_defconfig

* Fix network manager

* Remove runc patches

* Use same docker version

* Fix build

* Fix vmtools

* Fix depens

* Fix handling with tempfiles

* Fix permission handling

* Fix cp

* Cleanup

* Fix mounts
2019-06-27 11:58:50 +02:00

47 lines
898 B
Bash

#!/bin/sh
#
# Start linuxptp
#
start() {
printf "Starting linuxptp daemon: "
start-stop-daemon -S -b -q -p /var/run/linuxptp-ptp4l.pid \
-x /usr/sbin/ptp4l -- -f /etc/linuxptp.cfg
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Starting linuxptp system clock synchronization: "
start-stop-daemon -S -b -q -p /var/run/linuxptp-phc2sys.pid \
-x /usr/sbin/phc2sys -- -s eth0 -c CLOCK_REALTIME -w -S 1.0
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping linuxptp system clock synchronization: "
start-stop-daemon -K -q -p /var/run/linuxptp-phc2sys.pid \
-x /usr/sbin/phc2sys
echo "OK"
printf "Stopping linuxptp daemon: "
start-stop-daemon -K -q -p /var/run/linuxptp-ptp4l.pid \
-x /usr/sbin/ptp4l
echo "OK"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?