:
#
#  (C) Copyright PTI., 1994
# This source file is the property of PTI.
# It may not be copied or distributed in any isomorphic form
# without an appropriate prior licensing arrangement with 
# PTI.
#
# Shell script for setting mode (TURBO/FAST)
#

echo "This command will rebuild the kernel and shutdown the system automatically."
echo " Do you really want to proceed with it (Y/N)? (default=N)\c"
read AAA
if [ "$AAA" != "Y" -a "$AAA" != "y" ]
then
	exit 0
fi
while [ 1 ]
do
	echo "\nWill the controller be in TURBO mode or FAST mode"
	echo " (T/F)? (default=T)\c"
	read ANS
	if [ "$ANS" = "" -o "$ANS" = "T" -o "$ANS" = "t" ]
	then
		TURBOMODE=1
		STRMODE=TURBO
		break
	fi
	if [ "$ANS" = "F" -o "$ANS" = "f" ]
	then
		TURBOMODE=0
		STRMODE=FAST
		break
	fi

done
strings - /bin/pwd | grep 'SCO' > /dev/null 2>&1
if [ $? = 0 ]
then
	WWW=wd0	
fi

strings - /bin/pwd | grep 'UNIX System V/386' > /dev/null 2>&1
if [ $? = 0 ]
then
	WWW=hd
fi

echo "
	int	pti_turbo_mode = ${TURBOMODE};
" > /etc/conf/pack.d/${WWW}/space.c
/etc/conf/bin/idbuild
if [ $? != 0 ]
then
	echo "\nSetting $STRMODE mode failed!\n\n"
	exit 1
fi
echo "\nSetting $STRMODE mode succeeded.\n\n"
sync
sync
cd /
shutdown -y -g0
