From b742df51c8be99aec0db046e14cd12657e4a211f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 24 Oct 2013 17:28:43 +0200 Subject: [rootfs-stage32] Fix broken hwclock call due to stage4 being available too early --- .../data/opt/openslx/scripts/systemd-setup_network_time | 8 +++++--- 1 file 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 -- cgit v1.2.3-55-g7522