commit: e3bfb68aece9378a0669c2893285808100fd5ea6 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> AuthorDate: Wed Jul 23 21:19:25 2014 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Thu Jul 24 22:40:14 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e3bfb68a
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 --- init.d/hwclock.in | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/init.d/hwclock.in b/init.d/hwclock.in index 823a5ab..4b0da02 100644 --- a/init.d/hwclock.in +++ b/init.d/hwclock.in @@ -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
