hwclock: always set the kernel's timezone

The hwclock service should set the time zone regardless of the setting
of the clock_hctosys variable. This needs to be done to prevent issues
when the system time is being synchronized using ntp.

X-Gentoo-Bug: 434410
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434410
This commit is contained in:
William Hubbs 2014-07-23 16:19:25 -05:00
parent 1f7582c78b
commit e3bfb68aec

View File

@ -83,22 +83,17 @@ start()
fi fi
fi fi
# Always set the kernel's time zone.
_hwclock --systz $utc_cmd $clock_args
: $(( retval += $? ))
if [ -e /etc/adjtime ] && yesno $clock_adjfile; then if [ -e /etc/adjtime ] && yesno $clock_adjfile; then
_hwclock --adjust $utc_cmd _hwclock --adjust $utc_cmd
: $(( retval += $? )) : $(( retval += $? ))
fi fi
# If setting UTC, don't bother to run hwclock when first booting if yesno ${clock_hctosys:-YES}; then
# as that's the default _hwclock --hctosys $utc_cmd $clock_args
if [ "$PREVLEVEL" != N -o \
"$utc_cmd" != --utc -o \
-n "$clock_args" ];
then
if yesno ${clock_hctosys:-YES}; then
_hwclock --hctosys $utc_cmd $clock_args
else
_hwclock --systz $utc_cmd $clock_args
fi
: $(( retval += $? )) : $(( retval += $? ))
fi fi