Skip to content

Commit

Permalink
Switch UTC setting from /etc/default/rcS to /etc/adjtime
Browse files Browse the repository at this point in the history
/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
  • Loading branch information
mika committed Nov 18, 2016
1 parent c48b71a commit a7a13cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions etc/grml/fai/config/scripts/GRMLBASE/18-timesetup
Expand Up @@ -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
Expand Down

0 comments on commit a7a13cf

Please sign in to comment.