From: Heiko Thiery Date: Thu, 12 Mar 2020 19:04:36 +0000 (+0100) Subject: package/linuxptp: rename systemd service scripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bacd7f82bc5d4657c113c0339361e149040606b1;p=buildroot.git package/linuxptp: rename systemd service scripts Use the same name as for the SysVinit scripts. This name is also used in debian. linuxptp-system-clock.service -> phc2sys.service linuxptp.service -> ptp4l.service Signed-off-by: Heiko Thiery Tested-by: Carlos Santos Tested-by: Carlos Santos Signed-off-by: Thomas Petazzoni --- diff --git a/package/linuxptp/linuxptp-system-clock.service b/package/linuxptp/linuxptp-system-clock.service deleted file mode 100644 index 57beec4579..0000000000 --- a/package/linuxptp/linuxptp-system-clock.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Precision Time Protocol system clock synchronization -After=linuxptp.service - -[Service] -ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0 -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk index ba57396f86..921c55ad59 100644 --- a/package/linuxptp/linuxptp.mk +++ b/package/linuxptp/linuxptp.mk @@ -40,10 +40,10 @@ define LINUXPTP_INSTALL_INIT_SYSV endef define LINUXPTP_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.service \ - $(TARGET_DIR)/usr/lib/systemd/system/linuxptp.service - $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp-system-clock.service \ - $(TARGET_DIR)/usr/lib/systemd/system/linuxptp-system-clock.service + $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/ptp4l.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ptp4l.service + $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/phc2sys.service \ + $(TARGET_DIR)/usr/lib/systemd/system/phc2sys.service endef $(eval $(generic-package)) diff --git a/package/linuxptp/linuxptp.service b/package/linuxptp/linuxptp.service deleted file mode 100644 index 14e9814b06..0000000000 --- a/package/linuxptp/linuxptp.service +++ /dev/null @@ -1,13 +0,0 @@ -[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] -ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/package/linuxptp/phc2sys.service b/package/linuxptp/phc2sys.service new file mode 100644 index 0000000000..63b0ca23c3 --- /dev/null +++ b/package/linuxptp/phc2sys.service @@ -0,0 +1,10 @@ +[Unit] +Description=Precision Time Protocol system clock synchronization +After=ptp4l.service + +[Service] +ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0 +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/linuxptp/ptp4l.service b/package/linuxptp/ptp4l.service new file mode 100644 index 0000000000..07f0b68fad --- /dev/null +++ b/package/linuxptp/ptp4l.service @@ -0,0 +1,13 @@ +[Unit] +Description=Precision Time Protocol daemon +After=syslog.target network.target +Before=time-sync.target +Wants=time-sync.target +Wants=phc2sys.service + +[Service] +ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg +Restart=always + +[Install] +WantedBy=multi-user.target