#	ATT:#ident	"initpkg:init.d/autoconfig	1.3"	
	
#ident	"@(#)initpkg/init.d:autoconfig	25.1"


#  if a self configuration occurred during the boot
#  sequence, the following must be done:
#
#     run mkunix to generate an absolute UNIX file
#
#  ckauto -- is a program that is used to determine if an
#   	     auto configuration took place
#

set `who -r`
#		$7 is current state (2 or 3)
#		$8 is number of times in this state previously
#		$9 is the previous state we were in

if [ "$9" = "S" -a "$8" = "0" ]
then
	/etc/ckauto
	if [ $? -eq 1 ]
	then
		echo 'Generating a new /unix'
		/etc/mkunix -o /unix > /dev/null
	fi
fi
