aboutsummaryrefslogtreecommitdiffstats
path: root/50-ntpdate
diff options
context:
space:
mode:
Diffstat (limited to '50-ntpdate')
-rw-r--r--50-ntpdate14
1 files changed, 14 insertions, 0 deletions
diff --git a/50-ntpdate b/50-ntpdate
new file mode 100644
index 0000000..f9e980a
--- /dev/null
+++ b/50-ntpdate
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Sync time from pool.ntp.org as soon as connection is up
+
+case "${reason}" in
+ BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC)
+ # this reads nameserver from /etc/ntp.conf
+ ntpd -q
+ # alternatively use ntpdate and give hostname
+ #ntpdate -u pool.ntp.org
+ ;;
+ PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP)
+ # do nothing here...
+ ;;
+esac