diff options
-rwxr-xr-x | rc.shutdown | 4 | ||||
-rwxr-xr-x | rc.sysinit | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/rc.shutdown b/rc.shutdown index 8befcf8..e242b97 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -55,6 +55,10 @@ stat_busy "Saving Random Seed" stat_done stat_busy "Saving System Clock" +if [ "$TIMEZONE" != "" -a -e /usr/share/zoneinfo/$TIMEZONE ]; then + /bin/rm -f /etc/localtime + /bin/cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime +fi if [ "$HARDWARECLOCK" = "UTC" ]; then /sbin/hwclock --directisa --utc --systohc else @@ -153,9 +153,9 @@ status "Mounting Root Read-only" /bin/mount -n -o remount,ro / # Clock is set again later to match rc.conf if [ -f /etc/localtime ]; then if [ "$HARDWARECLOCK" = "UTC" ]; then - /sbin/hwclock --directisa --utc --hctosys + /sbin/hwclock --directisa --utc --hctosys --noadjfile else - /sbin/hwclock --directisa --localtime --hctosys + /sbin/hwclock --directisa --localtime --hctosys --noadjfile fi fi @@ -229,17 +229,18 @@ stat_done status "Activating Swap" /sbin/swapon -a stat_busy "Configuring System Clock" -if [ "$TIMEZONE" != "" ]; then - /bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime +if [ ! -f /var/lib/hwclock/adjtime ]; then + echo "0.0 0 0.0" > /var/lib/hwclock/adjtime +fi +if [ "$TIMEZONE" != "" -a -e /usr/share/zoneinfo/$TIMEZONE ]; then + /bin/rm -f /etc/localtime + /bin/cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime fi if [ "$HARDWARECLOCK" = "UTC" ]; then /sbin/hwclock --directisa --utc --hctosys else /sbin/hwclock --directisa --localtime --hctosys fi -if [ ! -f /var/lib/hwclock/adjtime ]; then - echo "0.0 0 0.0" > /var/lib/hwclock/adjtime -fi stat_done if [ -f /var/run/random-seed ]; then |