summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-10-08 22:04:43 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-10-08 22:04:43 (EDT)
commitf17d10d20f5c3a1a35789ba2c255504bdc977cee (patch)
tree380931e6c599e6ec799aa8bd2c891c6be1717913
parent0a2bcacc7aee69d804de023baab71e4982db5e9f (diff)
Add ntpd service script
-rw-r--r--scripts1
-rw-r--r--src.etc/init.d/ntpd20
2 files changed, 21 insertions, 0 deletions
diff --git a/scripts b/scripts
index d6527d6..4176aaf 100644
--- a/scripts
+++ b/scripts
@@ -7,6 +7,7 @@ FEATURE_MOUNT_FLAGS mountdevsubfs S03 K97
FEATURE_MOUNT_FLAGS mountkernfs S01 K99
FEATURE_MOUNT_FLAGS mounttmpfs S03 K97
IFUPDOWN networking S20 K80
+NTPD ntpd enabled
SYSLOGD syslog enabled
TELNETD telnetd disabled
- boottime enabled
diff --git a/src.etc/init.d/ntpd b/src.etc/init.d/ntpd
new file mode 100644
index 0000000..3f8086f
--- /dev/null
+++ b/src.etc/init.d/ntpd
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+
+START='25'
+STOP='75'
+
+start()
+{
+ log 'Starting ntpd'
+ start-stop-daemon -S -q -x /sbin/ntpd -- \
+ -p 0.pool.ntp.org \
+ -p 1.pool.ntp.org \
+ -p 2.pool.ntp.org \
+ -p 3.pool.ntp.org
+}
+
+stop()
+{
+ log 'Stopping ntpd'
+ start-stop-daemon -K -q -p /var/run/ntpd.pid
+}