[ntp/f17] update service file for systemd-timedated-ntp target (#816495)

Miroslav Lichvar mlichvar at fedoraproject.org
Fri Apr 27 08:31:32 UTC 2012


commit a05ddcca8f863e9d2585271207bad00da4b30e6f
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Fri Apr 27 10:27:57 2012 +0200

    update service file for systemd-timedated-ntp target (#816495)

 ntp.spec     |    5 +++++
 ntpd.service |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ntp.spec b/ntp.spec
index 250efbb..5ec70e4 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -257,6 +257,10 @@ install -p -m755 %{SOURCE10} .%{_sysconfdir}/dhcp/dhclient.d/ntp.sh
 install -p -m644 %{SOURCE12} ./lib/systemd/system/ntpd.service
 install -p -m644 %{SOURCE13} ./lib/systemd/system/ntpdate.service
 install -p -m644 %{SOURCE14} ./lib/systemd/system/ntp-wait.service
+
+mkdir ./lib/systemd/system/systemd-timedated-ntp.target.wants
+ln -sf ../ntpd.service ./lib/systemd/system/systemd-timedated-ntp.target.wants
+
 popd
 
 %clean
@@ -337,6 +341,7 @@ fi
 %{_mandir}/man8/sntp.8*
 %{_mandir}/man8/tickadj.8*
 /lib/systemd/system/ntpd.service
+/lib/systemd/system/systemd-timedated-ntp.target.wants
 
 %files perl
 %defattr(-,root,root)
diff --git a/ntpd.service b/ntpd.service
index a5766e5..064fc05 100644
--- a/ntpd.service
+++ b/ntpd.service
@@ -1,6 +1,7 @@
 [Unit]
 Description=Network Time Service
 After=syslog.target ntpdate.service
+BindTo=systemd-timedated-ntp.target
 
 [Service]
 Type=forking


More information about the scm-commits mailing list