From db954a24f5ca25897f6531a2a9f3b157c59e96d0 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 21 Oct 2016 13:39:31 +0200 Subject: [PATCH] Switch UTC setting from /etc/default/rcS to /etc/adjtime /etc/default/rcS doesn't necessarily exist anymore in Debian stretch or newer, So use the UTC/LOCAL setting in /etc/adjtime rather than the UTC setting in /etc/default/rcS. Thanks: Darshaka Pathirana --- etc/grml/fai/config/scripts/GRMLBASE/18-timesetup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup index 21b5084..da40243 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup @@ -10,10 +10,10 @@ set -u set -e # tell if hwclock is running in UTC or local time -# by default it's set to UTC=yes, we usually want UTC=no -if [ -n "$UTC" ] ; then - echo "Setting hwclock parameter UTC to $UTC" - sed -i "s|^UTC=.*$|UTC="$UTC"|" $target/etc/default/rcS +# by default it's set to UTC=no +if [ -n "$UTC" ] && [ "$UTC" = "yes" ] ; then + echo "UTC is set to 'yes', setting hwclock parameter UTC" + sed -i "s/^LOCAL/UTC/" "${target}/etc/adjtime" fi # default timezone settings -- 2.1.4