
# ***** This file has those commands necessary to check the file
# system, date, and anything else that should be done before mounting
# the file systems.


#!	chmod +x ${file}


rootfs=/dev/root
/etc/fsstat ${rootfs}  >/dev/null 2>&1

if [ $? -ne 0 ]
then
	/etc/dumpsave
	echo "
	fsstat: root file system needs checking
         The root file system (${rootfs}) is being checked automatically."
	/etc/fsck -y -D -b ${rootfs}
fi


trap "" 2

# **** Check date

. /etc/TIMEZONE
while :
do
	if [ -x /etc/getclk ]
	then
		newdate=`/etc/getclk`
		if [ $? -eq 0 ]
		then
			date "$newdate"
			break
		fi
	fi
	echo "Is the date `date` correct? (y or n) \c"
	read reply
	if
		[ "$reply" = y ]
	then
		break
	else
		echo "Enter the correct date (MMDDhhmm[YY]):  \c"
		read reply
		date "$reply"
	fi
done

