package: linuxptp: enhance systemd service
authorPetr Kulhavy <brain@jikos.cz>
Sun, 28 Jan 2018 16:00:20 +0000 (17:00 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 21 Oct 2018 22:02:24 +0000 (23:02 +0100)
linuxptp now pulls in the time-sync.target, which other services can
use to make sure they have a valid time before starting.

phc2sys (linuxptp-system-clock.service) starts after ptp4l
(linuxptp.service) so we have a valid time before writing it to the
hardware clock.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/linuxptp/linuxptp-system-clock.service
package/linuxptp/linuxptp.service

index 73272542cd0ff104cf15fd3eb8f085b5ec56210f..a4436a34a74bd63bbba0b8bcc7c8ded95c41f877 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=Precision Time Protocol system clock synchronization
-After=syslog.target network.target
+After=linuxptp.service
 
 [Service]
 ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0
index f690430633bada80f6d8c43f3ec70e231b281f89..14e9814b06ccd5f0e99977b6c1fb78f81b417716 100644 (file)
@@ -1,6 +1,8 @@
 [Unit]
 Description=Precision Time Protocol daemon
 After=syslog.target network.target
+Before=time-sync.target
+Wants=time-sync.target
 Wants=linuxptp-system-clock.service
 
 [Service]