[arch-projects] [initscripts][PATCH 1/3] rc.sysinit: avoid exporting empty TIMEZONE as TZ

Dave Reisner d at falconindy.com
Mon Mar 5 12:35:02 EST 2012


fixes FS#28458

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 rc.sysinit |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rc.sysinit b/rc.sysinit
index 88c72a0..b38d350 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -64,7 +64,9 @@ if [[ $HWCLOCK_PARAMS ]]; then
 		# is used. If HARDWARECLOCK is not set in rc.conf, the value in
 		# /var/lib/hwclock/adjfile is used (in this case /var can not be a separate
 		# partition).
-	TZ=$TIMEZONE hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
+	[[ $TIMEZONE ]] && export TZ=$TIMEZONE
+	hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
+	unset TZ
 fi
 
 # Start/trigger UDev, load MODULES and settle UDev
-- 
1.7.9.2



More information about the arch-projects mailing list