From ae92346c03bc60578bfb5bddef9dbbf1b4d71460 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 4 Sep 2011 15:41:53 -0400 Subject: timezone: create /etc/localtime as a symlink Abstract out timezone setting into its own function, passing Country/Area as a parameter. Do some menial checking to make sure: - the zonefile actually exists, erroring when it doesn't - /etc/localtime is a symlink to the correct zoneinfo file, relinking when it isn't. Signed-off-by: Dave Reisner --- rc.sysinit | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 9f215c4..2a7db8b 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -221,9 +221,7 @@ run_hook sysinit_postmount status "Activating Swap" swapon -a -[[ $TIMEZONE ]] && - status "Configuring Time Zone" \ - cp --remove-destination "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime +[[ $TIMEZONE ]] && status "Configuring Time Zone" set_timezone "$TIMEZONE" RANDOM_SEED=/var/lib/misc/random-seed [[ -f $RANDOM_SEED ]] && -- cgit v1.2.3