#!/bin/sh
export PATH="$PATH:/sbin"
#
# Load any modules that are required by the system.
#
if [ -d /install/modules ]; then
	for j in /install/modules/?; do 
		if [ -d "$j" ]; then
			(cd $j && for i in *.o; do insmod $i; done )
		fi
	done
	(cd /install/modules && for i in *.o; do insmod $i; done )
fi
#
if [ echo -n >> /tmp/test.r.w ]; then
	rm -f /tmp/test.r.w
else
	if [ ! -e /etc/fastboot ]; then
		/sbin/fsck -A -a
	fi
fi

/sbin/mount -n -o remount /dev/sda2 /
rm -f /etc/fastboot

# remove /etc/mtab* so mount creates the /etc/mtab file
rm -f /etc/mtab* /etc/nologin /etc/utmp
echo -n "" >> /etc/utmp

# You may wish to clip this one down as well
#/bin/mv -f /etc/wtmp /etc/wtmp.old
#touch /etc/wtmp
echo -n "" >> /etc/utmp

/sbin/mount -avt nonfs
/sbin/swapon -a

rm -f /usr/spool/uucp/LCK*

/sbin/update&
sh /etc/rc.local
