diff options
author | Simon Rettberg | 2013-10-24 17:28:43 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-10-24 17:28:43 +0200 |
commit | b742df51c8be99aec0db046e14cd12657e4a211f (patch) | |
tree | f427931564138230ed6e64ae6ae7b10224a0f2dc /remote/rootfs/rootfs-stage32/data | |
parent | [dnbd3] Bump version again (diff) | |
download | tm-scripts-b742df51c8be99aec0db046e14cd12657e4a211f.tar.gz tm-scripts-b742df51c8be99aec0db046e14cd12657e4a211f.tar.xz tm-scripts-b742df51c8be99aec0db046e14cd12657e4a211f.zip |
[rootfs-stage32] Fix broken hwclock call due to stage4 being available too early
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data')
-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 |