summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-07 10:29:38 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-09 23:15:24 -0600
commitebd79394a31d40c72d7f96a1cb832d1130777537 (patch)
treebec5e163bf0ed6f8b644501c19f02353b155236c
parent04379b2de9cf447e793294c4fe3f0d9b70194ffe (diff)
downloadopenrc-ebd79394a31d40c72d7f96a1cb832d1130777537.tar.gz
openrc-ebd79394a31d40c72d7f96a1cb832d1130777537.tar.bz2
openrc-ebd79394a31d40c72d7f96a1cb832d1130777537.tar.xz
set timezone if RC_HCTOSYS is not set
We need to set the timezone for the system clock even when we allow the kernel to set the time. X-Gentoo-Bug: 248131 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=248131
-rw-r--r--init.d/hwclock.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/init.d/hwclock.in b/init.d/hwclock.in
index 040d84a..f673d35 100644
--- a/init.d/hwclock.in
+++ b/init.d/hwclock.in
@@ -64,7 +64,6 @@ _hwclock()
start()
{
- yesno $clock_hctosys || return 0
local retval=0 errstr=""
setupopts
@@ -95,7 +94,11 @@ start()
"$utc_cmd}" != --utc -o \
-n "$clock_args" ];
then
- _hwclock --hctosys $utc_cmd $clock_args
+ if yesno $clock_hctosys; then
+ _hwclock --hctosys $utc_cmd $clock_args
+ else
+ _hwclock --systz $utc_cmd $clock_args
+ fi
retval=$(($retval + $?))
fi