: /etc/brc.build 7/24/92
: COHERENT executes this script when it boots.
: This version invokes /etc/build
: to install or update floppy-based COHERENT to the hard disk.

: Configure RAM disk and mount it on /tmp.
. /etc/.profile
/etc/mkfs /dev/ram1 384
/etc/mount /dev/ram1 /tmp

: Load drivers.
/etc/drvld.all

: Set the date from the system clock.
. /etc/timezone
/bin/date -s `/etc/ATclock` >/dev/null

: /etc/build reboots automatically on success.
: Trap in case interrupted.
trap 'echo; echo Aborted...' 1 2 3

case "`/etc/boot_cmd`" in
	begin*)
		options=	;;
	update*)
		options='-u'	;;
	*)
		echo 'Installation/Update kit booted incorrectly.'
		echo 'When booting, you must boot via "begin" or "update".'
		echo 'Please reboot and try again...'
		exit 1	;;
esac

if /etc/build $options
then
else
	echo The COHERENT system installation failed, please reboot and try again.
fi
sync
exit 1
