From 914b0b3b572a3d5d311682a88424d165589798f1 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sat, 23 Nov 2002 20:37:55 +0000 Subject: added jk's changes: system clock is set earlier on, and modules.dep is only updated if new modules are present. --- rc.sysinit | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index d249f1c..849a28a 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -45,10 +45,20 @@ stat_done stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / -/bin/rm -f /etc/mtab* +/bin/rm -f /etc/mtab* /bin/mount -a -t nonfs stat_done +stat_busy "Configuring System Clock" +/sbin/hwclock --hctosys +if [ ! -f /etc/adjtime ]; then + echo "0.0 0 0.0" > /etc/adjtime +fi +if [ "$TIMEZONE" != "" ]; then + /bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime +fi +stat_done + stat_busy "Removing Leftover Files" /bin/rm -f /etc/nologin &> /dev/null /bin/rm -f /etc/shutdownpid &> /dev/null @@ -69,22 +79,20 @@ status "Starting System Logger" /usr/sbin/syslogd -m 0 status "Starting Kernel Logger" /usr/sbin/klogd -c 4 -status "Updating Module Dependencies" /sbin/depmod -a +kernel_version=`uname -r` +if [ -e "/lib/modules/$kernel_version/modules.dep" ]; then + new_mods=`/usr/bin/find /lib/modules/$kernel_version -type f -newer /lib/modules/$kernel_version/modules.dep` + if [ ! -z $new_mods ]; then + status "Updating Module Dependencies" /sbin/depmod -a + fi +else + status "Updating Module Dependencies" /sbin/depmod -a +fi if [ -f /var/run/random-seed ]; then status "Initializing Random Seed" /bin/cat /var/run/random-seed > /dev/urandom fi -stat_busy "Configuring System Clock" -if [ ! -f /etc/adjtime ]; then - echo "0.0 0 0.0" > /etc/adjtime -fi -if [ "$TIMEZONE" != "" ]; then - /bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime -fi -/sbin/hwclock --hctosys -stat_done - if [ "$KEYMAP" != "" ]; then status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP fi -- cgit v1.2.3