diff options
-rwxr-xr-x | rc.d/rc.sysinit | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 24791941..81607ead 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -70,7 +70,6 @@ relabel_selinux() { } if [ "$CONSOLETYPE" = "vt" -a -x /sbin/setsysfont ]; then - echo -n "Setting default font ($SYSFONT): " /sbin/setsysfont if [ $? -eq 0 ]; then success @@ -103,6 +102,45 @@ if [ "$PROMPT" != "no" ]; then echo fi +# Set the system clock. +update_boot_stage RCclock +ARC=0 +SRM=0 +UTC=0 + +if [ -f /etc/sysconfig/clock ]; then + . /etc/sysconfig/clock + + # convert old style clock config to new values + if [ "${CLOCKMODE}" = "GMT" ]; then + UTC=true + elif [ "${CLOCKMODE}" = "ARC" ]; then + ARC=true + fi +fi + +CLOCKDEF="" +CLOCKFLAGS="$CLOCKFLAGS --hctosys" + +case "$UTC" in + yes|true) CLOCKFLAGS="$CLOCKFLAGS --utc" + CLOCKDEF="$CLOCKDEF (utc)" ;; + no|false) CLOCKFLAGS="$CLOCKFLAGS --localtime" + CLOCKDEF="$CLOCKDEF (localtime)" ;; +esac +case "$ARC" in + yes|true) CLOCKFLAGS="$CLOCKFLAGS --arc" + CLOCKDEF="$CLOCKDEF (arc)" ;; +esac +case "$SRM" in + yes|true) CLOCKFLAGS="$CLOCKFLAGS --srm" + CLOCKDEF="$CLOCKDEF (srm)" ;; +esac + +/sbin/hwclock $CLOCKFLAGS + +action $"Setting clock $CLOCKDEF: `date`" /bin/true + # Fix console loglevel if [ -n "$LOGLEVEL" ]; then /bin/dmesg -n $LOGLEVEL @@ -228,45 +266,6 @@ fi update_boot_stage RCkernelparam sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 -# Set the system clock. -update_boot_stage RCclock -ARC=0 -SRM=0 -UTC=0 - -if [ -f /etc/sysconfig/clock ]; then - . /etc/sysconfig/clock - - # convert old style clock config to new values - if [ "${CLOCKMODE}" = "GMT" ]; then - UTC=true - elif [ "${CLOCKMODE}" = "ARC" ]; then - ARC=true - fi -fi - -CLOCKDEF="" -CLOCKFLAGS="$CLOCKFLAGS --hctosys" - -case "$UTC" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --utc" - CLOCKDEF="$CLOCKDEF (utc)" ;; - no|false) CLOCKFLAGS="$CLOCKFLAGS --localtime" - CLOCKDEF="$CLOCKDEF (localtime)" ;; -esac -case "$ARC" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --arc" - CLOCKDEF="$CLOCKDEF (arc)" ;; -esac -case "$SRM" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --srm" - CLOCKDEF="$CLOCKDEF (srm)" ;; -esac - -/sbin/hwclock $CLOCKFLAGS - -action $"Setting clock $CLOCKDEF: `date`" /bin/true - if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then KEYTABLE= KEYMAP= |