#ident "@(#)initpkg:init.d/firstcheck	35.2"
#	Perform the "never have been run before" checks.

set `who -r`
if [ $9 != "S" ]
then
	exit
fi

if m88k
then
echo '
This machine has not been used as a customer machine yet.  The messages that
follow are from checking the built-in file systems for damage that might have
occurred during shipment.  As long as you do not see either of the messages
				BOOT SYSV88
				    or
			  FILE SYSTEM WAS MODIFIED
all is well.  If either message does come out, call your service representative.
However, the machine is still usable unless you are told otherwise.'
else
echo '
This machine has not been used as a customer machine yet.  The messages that
follow are from checking the built-in file systems for damage that might have
occurred during shipment.  As long as you do not see either of the messages
				BOOT SYSV68
				    or
			  FILE SYSTEM WAS MODIFIED
all is well.  If either message does come out, call your service representative.
However, the machine is still usable unless you are told otherwise.'
fi
sleep 20
echo 'Checking file systems:
'
sync

rootfs=/dev/root

if  /etc/fsck -y -D ${rootfs} `sed '	/^#/d
			s/[ 	].*//' /etc/fstab`
then
	echo '\n'
else
	echo '
        WARNING: The file system check has identified serious problems.
        We strongly recommend that you contact your service representative
        before using the machine.

The system will now be halted.
'
	sleep 4
	/etc/uadmin 2 0
	sleep 65000
fi
