diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-01-08 03:06:56 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-01-08 03:10:11 -0600 |
commit | 9bf2014b750579d9720c13c9dfb9d358e0c27665 (patch) | |
tree | 184dda549842d6d7906c00684b6d07d2e636e3be /rc.sysinit | |
parent | ab5595c4f8cdea8e6b1813701828576cbfee2fc2 (diff) |
Allow --directisa configuration for hwclock calls
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -36,14 +36,20 @@ mount -n -t sysfs none /sys /sbin/modprobe usbcore >/dev/null 2>&1 grep -qw usbfs /proc/filesystems && mount -n -t usbfs none /proc/bus/usb +HWCLOCK_PARAMS="--hctosys" +if [ "$HARDWARECLOCK" = "UTC" ]; then + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc" +else + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime" +fi +if [ "$USEDIRECTISA" != "no" ]; then + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa" +fi + # Set clock early to fix some bugs with filesystem checks # Clock is set again later to match rc.conf if [ -f /etc/localtime ]; then - if [ "$HARDWARECLOCK" = "UTC" ]; then - /sbin/hwclock --directisa --utc --hctosys --noadjfile - else - /sbin/hwclock --directisa --localtime --hctosys --noadjfile - fi + /sbin/hwclock $HWCLOCK_PARAMS --noadjfile fi if [ -x /sbin/udevadm -a -d /sys/block ]; then @@ -308,11 +314,8 @@ 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 + +/sbin/hwclock $HWCLOCK_PARAMS stat_done if [ -f /var/run/random-seed ]; then |