diff options
author | Christian Hesse <mail@eworm.de> | 2013-05-27 09:44:17 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-05-27 09:44:17 +0200 |
commit | ca29e2f3ea556c40e8d60fbf57676da71b4f39ce (patch) | |
tree | 4715f8639058efc570dd17e212cafaaaabaf86b8 | |
parent | c41922c726bdd6b233d570dea49ced90a32eceeb (diff) | |
download | dhcpcd-hook-ntpdate-0.1.0.tar.gz dhcpcd-hook-ntpdate-0.1.0.tar.zst |
Initial import0.1.0
-rw-r--r-- | 50-ntpdate | 14 |
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 |