[ntp] add ntp-wait service

Miroslav Lichvar mlichvar at fedoraproject.org
Wed Jul 20 11:24:24 UTC 2011


commit 167636285ddf1f8e1875f17bc2c4ed328aa03214
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Wed Jul 20 12:38:56 2011 +0200

    add ntp-wait service

 ntp-wait.service |   14 ++++++++++++++
 ntp.spec         |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/ntp-wait.service b/ntp-wait.service
new file mode 100644
index 0000000..8d67e13
--- /dev/null
+++ b/ntp-wait.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Wait for ntpd to synchronize system clock
+After=ntpd.service
+Requires=ntpd.service
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntp-wait
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ntp.spec b/ntp.spec
index 1aa5e96..4362189 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -45,6 +45,7 @@ Source10: ntp.dhclient
 Source11: timepps.h
 Source12: ntpd.service
 Source13: ntpdate.service
+Source14: ntp-wait.service
 
 # ntpbz #802
 Patch1: ntp-4.2.6p1-sleep.patch
@@ -264,6 +265,7 @@ install -p -m600 %{SOURCE8} .%{_sysconfdir}/ntp/crypto/pw
 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
 popd
 
 %clean
@@ -357,6 +359,7 @@ fi
 %{_sbindir}/ntptrace
 %{_mandir}/man8/ntp-wait.8*
 %{_mandir}/man8/ntptrace.8*
+/lib/systemd/system/ntp-wait.service
 
 %files -n ntpdate
 %defattr(-,root,root)


More information about the scm-commits mailing list