From 26f23054e0bb68591eb4dbe373cd9806fbaeb83b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 4 May 2018 12:49:48 +0200 Subject: [rfs-stage31] If BIOS clock is local and NTP failed, read clock again Linux assumes RTC is UTC when booting up. In case the SLX config says to use localtime, read the hwclock again to get the right offset. --- core/rootfs/rootfs-stage31/data/inc/ntp_sync | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/rootfs/rootfs-stage31') diff --git a/core/rootfs/rootfs-stage31/data/inc/ntp_sync b/core/rootfs/rootfs-stage31/data/inc/ntp_sync index 410b56d2..ff2f0027 100755 --- a/core/rootfs/rootfs-stage31/data/inc/ntp_sync +++ b/core/rootfs/rootfs-stage31/data/inc/ntp_sync @@ -42,6 +42,10 @@ func_sync_net_time() { date -s "@$TTS" else echo "No fallback option for timesync available, relying on correct RTC setup" + if [ "x$SLX_BIOS_CLOCK" = "xlocal" ]; then + # Linux defaults to RTC = UTC, so read again in this case + hwclock -l -s + fi fi fi } -- cgit v1.2.3-55-g7522