From: Gustavo Zacarias Date: Tue, 20 Jan 2015 23:31:26 +0000 (-0300) Subject: openntpd: add systemd unit file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35f37d762648bb921aafd43fb34476c76e4eec91;p=buildroot.git openntpd: add systemd unit file Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- diff --git a/package/openntpd/ntpd.service b/package/openntpd/ntpd.service new file mode 100644 index 0000000000..a4ffa7318c --- /dev/null +++ b/package/openntpd/ntpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenNTP Daemon +After=network.target +Conflicts=systemd-timesyncd.service + +[Service] +Type=simple +ExecStart=/usr/sbin/ntpd -s -d + +[Install] +WantedBy=multi-user.target diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk index abc75aef8c..a6460cbe57 100644 --- a/package/openntpd/openntpd.mk +++ b/package/openntpd/openntpd.mk @@ -9,6 +9,14 @@ OPENNTPD_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD OPENNTPD_LICENSE = MIT-like, BSD-2c, BSD-3c OPENNTPD_LICENSE_FILES = COPYING +define OPENNTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/openntpd/ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/ntpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service +endef + define OPENNTPD_INSTALL_INIT_SYSV $(INSTALL) -m 0755 -D package/openntpd/S49ntp \ $(TARGET_DIR)/etc/init.d/S49ntp