-#!/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 <thomas.lehmann@kvt.de>
# Bug-Reports: send to author and see http://grml.org/bugs/
set -e
# tell if hwclock is running in UTC or local time
-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
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