]> git.pld-linux.org Git - packages/ntp.git/commitdiff
- upstart config
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 27 Jan 2011 21:56:09 +0000 (21:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ntpdate.upstart -> 1.1

ntpdate.upstart [new file with mode: 0644]

diff --git a/ntpdate.upstart b/ntpdate.upstart
new file mode 100644 (file)
index 0000000..dc72c17
--- /dev/null
@@ -0,0 +1,26 @@
+description "Synchronizes time with ntpdate (NTP client)"
+
+# TODO: act on "have default gateway" 
+# start on net-device-added INTERFACE!=lo
+# TODO: run before ntpd
+
+start on pld.network-started
+stop on pld.shutdown-started
+
+env NTPDATE_USER="ntp"
+
+task
+
+# mark that ntpdate fail is ok (task marked as done and hwclock skipped)
+normal exit 0 1
+
+script
+       # Source old-style ntp service configuration
+       [ -f /etc/sysconfig/ntpdate ] && . /etc/sysconfig/ntpdate
+               
+       /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS
+
+       if [ "$SYNC_HWCLOCK" = "yes" ]; then
+               /sbin/hwclock --systohc
+       fi
+end script
This page took 0.02805 seconds and 4 git commands to generate.