:
#ident	"@(#)idreboot	1.2	90/08/16"
#ident "@(#)idreboot	1.2 89/09/29"
#	@(#) idreboot 1.4 88/11/11 
#
#
#	      UNIX is a registered trademark of AT&T
#		Portions Copyright 1976-1989 AT&T
#	Portions Copyright 1980-1989 Microsoft Corporation
#    Portions Copyright 1983-1989 The Santa Cruz Operation, Inc
#		      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
