X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F18-timesetup;h=da402435fcfe27d619cbfdb313217f705109700d;hp=57c288b8b900b4be3de256bf077a7ebeeec956c1;hb=40b0557155a1203823d820af0b7bef21af037cd2;hpb=80c5fd262cb22446fbb465e6896b90a5854345da diff --git a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup index 57c288b..da40243 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup @@ -1,5 +1,5 @@ -#!/bin/sh -# Filename: /etc/grml/fai/config/scripts/GRMLBASE/18-timesetup +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/18-timesetup # Purpose: apply default time and timezone settings # Authors: (c) Thomas Lehmann # Bug-Reports: send to author and see http://grml.org/bugs/ @@ -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 @@ -31,4 +31,4 @@ if [ -n "$TIMEZONE" ] ; then fi ## END OF FILE ################################################################ -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2