:
#	@(#) idreboot 23.1 91/03/03 
#
#	Copyright (C) 1988-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#
#	      UNIX is a registered trademark of AT&T
#		Portions Copyright 1976-1989 AT&T
#		      All Rights Reserved
#
#ident	"@)#(idcmd:idreboot	1.7"
#
#	Reboot script for installable drivers. Forces the user to
#	reboot in a consistent manner.
#

if [ `tty` != /dev/console ] && [ `tty` != /dev/syscon ]
then
	message -i "To complete the install/remove process a system \
shutdown is necessary. You must be logged onto the \
console (/dev/console) and be \
using virtual terminal 0 in order to shut the system down.\n
You should now exit, log in at the console, and manually \
reboot as soon as possible.\n
Make sure your floppy drive is empty.  If you are installing or removing \
controller boards, you may power down the system after the shutdown \
has completed.\n\nStrike any key to continue."
exit 0
fi
sync
message -cu "To complete \
the install/remove process a shutdown is now being initiated automatically.\n
Make sure your floppy drive is empty.  If you are installing or removing \
controller boards, you may power down the system after the shutdown \
has completed."
if  [ "$?" = "0" ]
then
	cd /
	/etc/shutdown -g0 -y
	exec sleep 100
else
	message -d "The UNIX System has now been reconfigured, \
but you have not initiated a system reboot.\
  You should manually reboot as soon as possible."
fi
