aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2002-11-26 18:17:31 +0000
committerJudd Vinet <judd@archlinux.org>2002-11-26 18:17:31 +0000
commitc8cd508809408a0be9f1fbeb65775ab7fb083f3b (patch)
treec09ab6955f559236172bdc3e5a6afce214a98b6f
parent914b0b3b572a3d5d311682a88424d165589798f1 (diff)
downloadinitscripts-c8cd508809408a0be9f1fbeb65775ab7fb083f3b.tar.xz
Added utf hwclock support (from user patch)
-rw-r--r--rc.conf3
-rwxr-xr-xrc.shutdown6
-rwxr-xr-xrc.sysinit6
3 files changed, 13 insertions, 2 deletions
diff --git a/rc.conf b/rc.conf
index b54b92e..9226604 100644
--- a/rc.conf
+++ b/rc.conf
@@ -5,8 +5,11 @@
#
# Localization
#
+# Note: HARDWARECLOCK is either "UTC" or "localtime"
+#
KEYMAP=us
TIMEZONE=Canada/Pacific
+HARDWARECLOCK="localtime"
#
# Networking
diff --git a/rc.shutdown b/rc.shutdown
index 4688a6b..a49c18e 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -44,7 +44,11 @@ stat_busy "Saving Random Seed"
stat_done
stat_busy "Saving System Clock"
-/sbin/hwclock --systohc
+if [ $HARDWARECLOCK = "UTC" ]; then
+ /sbin/hwclock --utc --systohc
+else
+ /sbin/hwclock --localtime --systohc
+fi
stat_done
# Write to wtmp file before unmounting
diff --git a/rc.sysinit b/rc.sysinit
index 849a28a..169aca1 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -50,7 +50,11 @@ stat_busy "Mounting Local Filesystems"
stat_done
stat_busy "Configuring System Clock"
-/sbin/hwclock --hctosys
+if [ $HARDWARECLOCK = "UTC" ]; then
+ /sbin/hwclock --utc --hctosys
+else
+ /sbin/hwclock --localtime --hctosys
+fi
if [ ! -f /etc/adjtime ]; then
echo "0.0 0 0.0" > /etc/adjtime
fi