#!/bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.60 2000/05/16 15:08:25 zagrodzki Exp $
+# $Id: rc.sysinit,v 1.61 2000/05/20 13:34:06 jajcus Exp $
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
;;
esac
-if run_cmd "Setting clock$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
- show "Today's date: `LC_CTYPE=C date`"; ok
+# Check if timezone definition is available
+if [ -e /etc/localtime ] ; then
+ if run_cmd "Setting clock$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
+ show "Today's date: `LC_CTYPE=C date`"; ok
+ fi
+else
+ TIME_SETUP_DELAYED=yes
fi
# Start up swapping.
# filesystems are NOT unmounted in single user mode.
run_cmd "Mounting local filesystems." mount -a -t nonfs,smbfs,ncpfs,proc
+# Set the clock if timezone definition wasn't available (eg. /usr not mounted)
+if [ is_yes $TIME_SETUP_DELAYED ] ; then
+ if run_cmd "Setting clock$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
+ show "Today's date: `LC_CTYPE=C date`"; ok
+ fi
+fi
+
# set the console font
#if [ -x /sbin/setsysfont ]; then
# show "Loading default system font"; busy