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:
parent
1f7582c78b
commit
e3bfb68aec
@ -83,22 +83,17 @@ start()
|
||||
fi
|
||||
fi
|
||||
|
||||
# Always set the kernel's time zone.
|
||||
_hwclock --systz $utc_cmd $clock_args
|
||||
: $(( retval += $? ))
|
||||
|
||||
if [ -e /etc/adjtime ] && yesno $clock_adjfile; then
|
||||
_hwclock --adjust $utc_cmd
|
||||
: $(( retval += $? ))
|
||||
fi
|
||||
|
||||
# If setting UTC, don't bother to run hwclock when first booting
|
||||
# as that's the default
|
||||
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
|
||||
if yesno ${clock_hctosys:-YES}; then
|
||||
_hwclock --hctosys $utc_cmd $clock_args
|
||||
: $(( retval += $? ))
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user