[arch-projects] [initscripts][PATCH 1/2] rc.sysinit: sync hwclock time and timezone in separate calls

Dave Reisner dreisner at archlinux.org
Sun Sep 9 14:20:08 EDT 2012


hwclock from util-linux 2.22 no longer allows setting the time in the
same call as the timezone, so this fails. It's not really clear this
ever had the intended effect.

Fixes FS#31416.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
This will be backported to the current initscripts release to get
util-linux out of testing.

 rc.sysinit | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index b285cc7..2931a7d 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -34,8 +34,6 @@ bootlogd -p /run/bootlogd.pid
 
 run_hook sysinit_start
 
-HWCLOCK_PARAMS="--systz"
-
 if [[ $HARDWARECLOCK ]]; then
 	print_depr "HARDWARECLOCK=" "rc.conf(5) and hwclock(8)"
 
@@ -70,7 +68,7 @@ if [[ $HWCLOCK_PARAMS ]]; then
 		export TZ=$TIMEZONE
 	fi
 
-	hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
+	{ hwclock $HWCLOCK_PARAMS && hwclock --systz; } && stat_done || stat_fail
 
 	unset TZ
 fi
-- 
1.7.12



More information about the arch-projects mailing list