diff options
author | Christian Hesse <mail@eworm.de> | 2014-08-29 17:56:38 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-08-29 17:56:38 +0200 |
commit | e62f5ca6164a3504fff4e7536da86bff46772405 (patch) | |
tree | 704d0f5b030f01d43075435bf5e985aa76a68b9e /50-ntpdate | |
parent | 18024e7006027095430511893ee374a1ec0b596e (diff) | |
download | dhcpcd-hook-ntpdate-e62f5ca6164a3504fff4e7536da86bff46772405.tar.gz dhcpcd-hook-ntpdate-e62f5ca6164a3504fff4e7536da86bff46772405.tar.zst |
just run if ntpd is not running
Diffstat (limited to '50-ntpdate')
-rw-r--r-- | 50-ntpdate | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,7 +4,9 @@ case "${reason}" in BOUND|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # sync time as soon as connection is up # this reads nameserver from /etc/ntp.conf - ntpd --quit --panicgate + if ! pidof ntpd >/dev/null; then + ntpd --quit --panicgate + fi # alternatively use ntpdate and give hostname #ntpdate -u pool.ntp.org ;; |