1994-11-06 04:07:41 +00:00
|
|
|
#!/stand/sh
|
|
|
|
#
|
|
|
|
# bininst - perform the last stage of installation by somehow getting
|
|
|
|
# a bindist onto the user's disk and unpacking it. The name bininst
|
|
|
|
# is actually something of a misnomer, since this utility will install
|
|
|
|
# more than just the bindist set.
|
|
|
|
#
|
1994-11-09 02:49:04 +00:00
|
|
|
# Written: November 11th, 1994
|
1994-11-06 04:07:41 +00:00
|
|
|
# Copyright (C) 1994 by Jordan K. Hubbard
|
|
|
|
#
|
|
|
|
# Permission to copy or use this software for any purpose is granted
|
1994-11-11 10:55:02 +00:00
|
|
|
# provided that this message stay intact, and at this location (e.g. no
|
|
|
|
# putting your name on top after doing something trivial like reindenting
|
|
|
|
# it, just to make it look like you wrote it!).
|
1994-11-06 04:07:41 +00:00
|
|
|
#
|
1994-12-02 15:52:55 +00:00
|
|
|
# $Id: bininst,v 1.52 1994/11/30 11:58:28 jkh Exp $
|
1994-11-07 06:23:07 +00:00
|
|
|
|
1994-11-28 22:13:07 +00:00
|
|
|
if [ "${_BININST_LOADED_}" = "yes" ]; then
|
1994-11-30 11:58:29 +00:00
|
|
|
error "Error, $0 loaded more than once!"
|
1994-11-16 07:51:45 +00:00
|
|
|
return 1
|
|
|
|
else
|
|
|
|
_BININST_LOADED_=yes
|
|
|
|
fi
|
1994-11-11 10:55:02 +00:00
|
|
|
|
1994-11-16 07:51:45 +00:00
|
|
|
# Grab the miscellaneous functions.
|
1994-11-18 10:05:47 +00:00
|
|
|
. /stand/miscfuncs.sh
|
1994-11-06 04:07:41 +00:00
|
|
|
|
1994-11-16 07:51:45 +00:00
|
|
|
# Grab the installation routines
|
1994-11-18 10:05:47 +00:00
|
|
|
. /stand/instdist.sh
|
1994-11-11 10:55:02 +00:00
|
|
|
|
1994-11-16 07:51:45 +00:00
|
|
|
# Grab the network setup routines
|
1994-11-18 10:05:47 +00:00
|
|
|
. /stand/netinst.sh
|
1994-11-11 07:33:50 +00:00
|
|
|
|
|
|
|
# Deal with trigger-happy users.
|
|
|
|
trap interrupt 1 2 15
|
|
|
|
|
1994-11-16 07:51:45 +00:00
|
|
|
# set initial defaults
|
1994-11-18 12:54:45 +00:00
|
|
|
set_defaults()
|
|
|
|
{
|
1994-11-21 08:33:56 +00:00
|
|
|
network_set_defaults
|
1994-11-18 11:01:33 +00:00
|
|
|
media_set_defaults
|
1994-11-28 22:13:07 +00:00
|
|
|
INSTALLING="yes"
|
1994-11-07 11:30:15 +00:00
|
|
|
mkdir -p ${TMP}
|
1994-11-08 11:14:45 +00:00
|
|
|
cp /stand/etc/* /etc
|
1994-11-06 04:07:41 +00:00
|
|
|
}
|
|
|
|
|
1994-11-07 13:43:27 +00:00
|
|
|
# Print welcome banner.
|
1994-11-18 12:54:45 +00:00
|
|
|
welcome()
|
|
|
|
{
|
1994-11-28 22:13:07 +00:00
|
|
|
dialog --title "Welcome to FreeBSD!" --msgbox \
|
1994-11-18 16:27:54 +00:00
|
|
|
"Installation may now proceed from tape, CDROM, a network (NFS or ftp
|
|
|
|
over ethernet, SLIP or parallel port) or DOS (existing hard disk
|
|
|
|
partition or floppies). If you're installing over a network, make
|
|
|
|
sure your cables are plugged in and ready to go. If you're installing
|
|
|
|
from tape, CDROM or floppies, now would be a good time to remember
|
1994-11-28 22:13:07 +00:00
|
|
|
where you put the distribution media! :-) Please remove the cpio
|
|
|
|
floppy from the drive and press return." -1 -1
|
1994-11-06 04:07:41 +00:00
|
|
|
}
|
|
|
|
|
1994-11-08 07:24:51 +00:00
|
|
|
do_last_config()
|
|
|
|
{
|
1994-11-28 22:13:07 +00:00
|
|
|
DONE=""
|
|
|
|
while [ "${DONE}" = "" ]; do
|
1994-11-20 14:49:48 +00:00
|
|
|
dialog --title "Final Configuration!" --menu \
|
|
|
|
"We now come to the end of the installation. If there's a\n\
|
|
|
|
floppy in the boot drive, now would probably be a good time\n\
|
|
|
|
to remove it as the system will reboot when you exit the shell\n\
|
|
|
|
at the end of this stage.\n\n\
|
1994-11-28 22:13:07 +00:00
|
|
|
Please select one of the following options:" -1 -1 5 \
|
1994-11-20 14:49:48 +00:00
|
|
|
"tzsetup" "Configure your time zone" \
|
1994-12-02 15:52:55 +00:00
|
|
|
"network" "Configure networking" \
|
1994-11-20 14:49:48 +00:00
|
|
|
"user" "Add a user name for yourself to the system" \
|
|
|
|
"guest" "Simply add a user \"guest\" with all default options" \
|
|
|
|
"done" "Exit the installation." 2> ${TMP}/menu.tmp.$$
|
1994-11-28 22:13:07 +00:00
|
|
|
RETVAL=$?
|
|
|
|
CHOICE=`cat ${TMP}/menu.tmp.$$`
|
1994-11-20 14:49:48 +00:00
|
|
|
rm -f ${TMP}/menu.tmp.$$
|
1994-11-28 22:13:07 +00:00
|
|
|
if ! handle_rval ${RETVAL}; then exit 0; fi
|
1994-11-20 14:49:48 +00:00
|
|
|
|
1994-11-28 22:13:07 +00:00
|
|
|
case ${CHOICE} in
|
1994-11-20 14:49:48 +00:00
|
|
|
tzsetup)
|
|
|
|
dialog --clear
|
1994-11-21 02:17:06 +00:00
|
|
|
sh /stand/tzsetup
|
1994-11-20 14:49:48 +00:00
|
|
|
dialog --clear
|
|
|
|
;;
|
|
|
|
|
1994-11-28 22:13:07 +00:00
|
|
|
network)
|
|
|
|
network_setup
|
|
|
|
;;
|
|
|
|
|
1994-11-20 14:49:48 +00:00
|
|
|
user)
|
|
|
|
sh /stand/adduser.sh -i
|
|
|
|
;;
|
|
|
|
|
|
|
|
guest)
|
|
|
|
sh /stand/adduser.sh
|
|
|
|
;;
|
|
|
|
|
1994-11-21 09:50:02 +00:00
|
|
|
done)
|
1994-11-28 22:13:07 +00:00
|
|
|
DONE="yes"
|
1994-11-21 09:50:02 +00:00
|
|
|
;;
|
1994-11-20 14:49:48 +00:00
|
|
|
esac
|
1994-11-21 09:50:02 +00:00
|
|
|
done
|
1994-11-20 14:49:48 +00:00
|
|
|
|
|
|
|
dialog --title "Auf Wiedersehen!" --msgbox \
|
|
|
|
"Don't forget that the login name \"root\" has no password.
|
|
|
|
If you didn't create any users with adduser, you can at least log in
|
|
|
|
as this user. Also be aware that root is the _superuser_, which means
|
|
|
|
that you can easily wipe out your system if you're not careful!
|
|
|
|
|
|
|
|
There are many useful pre-compiled packages for ${DISTNAME}
|
|
|
|
available which you may also wish to investigate. Look in:
|
|
|
|
|
|
|
|
ftp://ftp.freebsd.org/pub/FreeBSD/${DISTNAME}/packages
|
1994-11-16 07:51:45 +00:00
|
|
|
|
|
|
|
Any install-related comments to jkh@freebsd.org, phk@freebsd.org or
|
1994-11-20 14:49:48 +00:00
|
|
|
paul@freebsd.org.
|
|
|
|
|
|
|
|
We sincerely hope you enjoy FreeBSD 2.0!
|
|
|
|
|
|
|
|
The FreeBSD Project Team" -1 -1
|
1994-11-08 07:24:51 +00:00
|
|
|
}
|
|
|
|
|
1994-11-06 04:07:41 +00:00
|
|
|
welcome
|
1994-11-07 06:23:07 +00:00
|
|
|
set_defaults
|
1994-11-06 04:07:41 +00:00
|
|
|
|
1994-11-28 22:13:07 +00:00
|
|
|
while [ "${INSTALLING}" = "yes" ]; do
|
1994-11-16 07:51:45 +00:00
|
|
|
if media_select_distribution; then
|
|
|
|
if media_chose; then
|
1994-11-18 12:54:45 +00:00
|
|
|
media_install_set
|
1994-11-16 07:51:45 +00:00
|
|
|
fi
|
1994-11-06 04:07:41 +00:00
|
|
|
else
|
1994-11-08 07:24:51 +00:00
|
|
|
do_last_config
|
1994-11-28 22:13:07 +00:00
|
|
|
INSTALLING="no"
|
1994-11-06 04:07:41 +00:00
|
|
|
fi
|
|
|
|
done
|
1994-11-08 13:58:34 +00:00
|
|
|
echo; echo "Spawning shell. Exit shell to continue with new bindist."
|
1994-11-08 11:14:45 +00:00
|
|
|
echo "Progress <installation completed>" > /dev/ttyv1
|
1994-11-08 13:58:34 +00:00
|
|
|
/stand/sh
|
|
|
|
exit 20
|