diff options
-rwxr-xr-x | modules.d/slx-clock/module-setup.sh | 4 | ||||
-rwxr-xr-x | modules.d/slx-clock/scripts/ntp-sync.sh | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/modules.d/slx-clock/module-setup.sh b/modules.d/slx-clock/module-setup.sh index 8dbce9f1..12533363 100755 --- a/modules.d/slx-clock/module-setup.sh +++ b/modules.d/slx-clock/module-setup.sh @@ -14,9 +14,7 @@ depends() { install() { # wait til we have the openslx config for ntp servers # which happens in pre-mount/10 - inst_multiple ntpdate /etc/services /usr/share/zoneinfo/Europe/Berlin - # Needed on newer systems, where ntpdate is just a wrapper around it - inst_multiple -o ntpdig + inst_multiple /etc/services /usr/share/zoneinfo/Europe/Berlin inst /usr/share/zoneinfo/Europe/Berlin /etc/localtime inst_hook pre-mount 15 "$moddir/scripts/ntp-sync.sh" inst_hook pre-pivot 15 "$moddir/scripts/configure-timesyncd.sh" diff --git a/modules.d/slx-clock/scripts/ntp-sync.sh b/modules.d/slx-clock/scripts/ntp-sync.sh index d9c0e7bc..81b4b5a3 100755 --- a/modules.d/slx-clock/scripts/ntp-sync.sh +++ b/modules.d/slx-clock/scripts/ntp-sync.sh @@ -12,7 +12,7 @@ ntp_sync() { done local SUCCESS= for SERVER in $SLX_DHCP_NTP; do - if ntpdate -u "$SERVER"; then + if timeout 3 ntpd -q -n -p "$SERVER"; then echo "Successfully queried $SERVER for time." if [ "x$SLX_BIOS_CLOCK" = "xlocal" ]; then usleep 100000 |