diff options
| -rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time index 87c93fd4..c0b97425 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time @@ -1,16 +1,18 @@ #!/bin/sh . /opt/openslx/config || { echo "Could not source config!"; exit 1; } -SLX_NTP_SERVER="$SLX_NTP_SERVER 0.de.pool.ntp.org" + +[ -z "$SLX_NTP_SERVER" ] && exit 0 + for SERVER in $SLX_NTP_SERVER; do if ntpdate -u -p 2 "$SERVER"; then echo "Successfully queried $SERVER for time." if [ "x$SLX_BIOS_CLOCK" = "xlocal" ]; then usleep 100000 - hwclock -l -w || echo "... but could not set BIOS clock to localtime" + /opt/openslx/sbin/hwclock -l -w || echo "... but could not set BIOS clock to localtime" elif [ "x$SLX_BIOS_CLOCK" = "xutc" ]; then usleep 100000 - hwclock -u -w || echo "... but could not set BIOS clock to UTC" + /opt/openslx/sbin/hwclock -u -w || echo "... but could not set BIOS clock to UTC" fi exit 0 fi |
