: "
/* mksys.wini
 *
 *	Title:	mksys.wini
 *
 *	Scripts to install xenix.
 *
 *	/etc/mksys.wini installs the system after the wini has
 *		been initialized. This file is invoked from the wini.
 *
 */
"
echo Checking previously installed file system...
trap "" 0 1 2 3 15
echo fsck /dev/root
fsck /dev/root 
echo 
stty raw >/dev/console
stty cooked >/dev/console
echo
/etc/firsttime
/etc/umount /dev/usr
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Insert Diskette Labeled 'Root 1 of 3' and type a <cr>"
read ok
echo
/etc/install ds /
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Insert Diskette Labeled 'Root 2 of 3' and type a <cr>"
read ok
rm /etc/shutdown
rm /bin/l
echo
/etc/install ds / 
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Insert Diskette Labeled 'Root 3 of 3' and type a <cr>"
read ok
echo
/etc/install ds / 
>/etc/mtab
/etc/mount /dev/usr /usr
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Insert Diskette Labeled 'User 1 of 2' and type a <cr>"
read ok
echo
/etc/install ds / 
echo -n "Insert Diskette Labeled 'User 2 of 2' and type a <cr>"
read ok
echo
/etc/install ds / 
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Do you wish to install the optional User Man files?"
read ok
echo
if test A$ok = Ay -o A$ok = Ayes; then
	stty raw >/dev/console
	stty cooked >/dev/console
	echo
	echo -n "Insert Diskette Labled 'User Manual 1 of 1' \
and type a <cr>"
	read ok
	echo
	/etc/install ds /
	echo ""
fi
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Do you wish to install the optional User Documents? "
read ok
echo
if test A$ok = Ay -o A$ok = Ayes; then
		stty raw >/dev/console
		stty cooked >/dev/console
		echo
		echo -n "Insert Diskette Labeled \
'User Documents 1 of 2' and type a <cr>"
		read ok
		echo
		/etc/install ds / 
		stty raw >/dev/console
		stty cooked >/dev/console
		echo
		echo -n "Insert Diskette Labeled \
'User Documents 2 of 2' and type a <cr>"
		read ok
		echo
		/etc/install ds / 
		echo ""
fi
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Is there an upgrade yet? "
read ok
echo
stty raw >/dev/console
stty cooked >/dev/console
echo
if test A$ok = Ay -o A$ok = Ayes; then
		stty raw >/dev/console
		stty cooked >/dev/console
		echo
		echo -n "Insert Diskette and type <cr>"
		read ok
		echo " " 
		echo "Installing upgrade to system..." 
		echo " " 
		/etc/install ds / 
		echo " "
		echo "Executing upgrade procedure..."
		echo " "
		/tmp/upgrade 
fi
sync
stty raw >/dev/console
stty cooked >/dev/console
echo
echo -n "Do you wish to setup the learn scripts?  "
read ok
echo
if test A$ok != An -a A$ok != Ano; then
	echo "Making learn scripts..."
	cd /usr/lib/learn
	make lessons
	make play
	make log
else
	echo "Learn scripts not installed."
fi
cd /
sync
/etc/umount /dev/usr
sync
stty raw >/dev/console
stty cooked >/dev/console
echo 
echo -n "Do you want the iSBC 534 setup for login? " 
read ok
if test A$ok = Ay -o A$ok = Ayes ; then
	echo 
	echo "iSBC 534 logins are turned on in the file /etc/ttys."
	echo "To turn the login off consult the Xenix system reference"
	echo "manual volume 4 for TTYS. The default baud rate for all"
	echo "iSBC 534 login lines is 9600 baud. The iSBC 534 must"
	echo "have been 'found' when the system was booted."
	echo 
	sed /ttya\[0123\]/s/0/1/ /etc/ttys >/etc/ttys.534
	cp /etc/ttys /etc/ttys.org
	mv /etc/ttys.534 /etc/ttys
	chmod 644 /etc/ttys
	chown bin /etc/ttys /etc/ttys.org
	echo "iSBC 534 is set up for login on board 0."
fi
sync
echo
echo
echo "**********************************"
echo "Installation of Xenix is complete."
echo "**********************************"
echo
echo
echo "/usr is un-mounted."
echo
echo "When prompted for a login the following are available:"
echo "demo learn who bin root"
echo 
echo Be Very Careful of what you do if you login as root 
echo because root is the master of all things and has the
echo capability to destroy/change anything in your system.
echo
echo A demonstration of a standard login has been provided
echo to aid in the familiarization of the system. The login
echo "name is 'demo', simply type demo when prompted to login."
echo
echo The learn login will get you into the learn program.
echo The who login will tell you who is on the system and logout.
echo 
echo The console will be set for a baud rate of 9600 baud
echo when you go multi-user. Insure you set your terminal
echo for this speed. If you are using a hard copy terminal
echo "read the manual entry STTY(1) in the Xenix Software"
echo development manual, Volume 2.
echo
echo "Type ^D to bring the system up multi-user with the login prompt."
echo "If you have problems contact your local service representative."
echo
