#! /bin/sh
#
# bcheckrc	This script is run when the system comes up for
#		the first time.

echo "/etc/bcheckrc"
/sbin/swapon -a
if [ -f /etc/kbmap ];then
	/bin/loadkeys /etc/kbmap
fi

if [ ! -f /etc/fastboot ]
then
	echo "/sbin/fsck -A -av"
	/sbin/fsck -A -av
fi

# Remount the root filesystem in read-write mode
/bin/mount -n -o remount,rw /

# Be sure /etc/mtab and /etc/utmp are up to date.
rm -f /etc/mtab* /etc/fastboot /etc/nologin /etc/utmp /etc/syslog.pid
>/etc/utmp;/bin/chmod 444 /etc/utmp

/bin/hostname -Sv

if [ ! -f /etc/adjtime ]
then
	echo "0.0 0 0.0" > /etc/adjtime
	/bin/chmod 644 /etc/adjtime
	/bin/chown root.root /etc/adjtime
fi

# Set the system clock, and adjust the CMOS clock (which is in local time).
# Change 'clock -a' to 'clock -au' if your CMOS clock is set to GMT.
/sbin/clock -a

# All done.
