mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
1ce5c9dc5c
Ask less questions about the temporary directory if instructed to.
144 lines
3.7 KiB
Bash
Executable File
144 lines
3.7 KiB
Bash
Executable File
#!/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.
|
|
#
|
|
# Written: November 11th, 1994
|
|
# Copyright (C) 1994 by Jordan K. Hubbard
|
|
#
|
|
# Permission to copy or use this software for any purpose is granted
|
|
# 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!).
|
|
#
|
|
# $Id: bininst,v 1.55 1994/12/29 20:09:59 jkh Exp $
|
|
|
|
if [ "${_BININST_LOADED_}" = "yes" ]; then
|
|
error "Error, $0 loaded more than once!"
|
|
return 1
|
|
else
|
|
_BININST_LOADED_=yes
|
|
fi
|
|
|
|
# Grab the miscellaneous functions.
|
|
. /stand/miscfuncs.sh
|
|
|
|
# Grab the installation routines
|
|
. /stand/instdist.sh
|
|
|
|
# Grab the network setup routines
|
|
. /stand/netinst.sh
|
|
|
|
# Deal with trigger-happy users.
|
|
trap interrupt 1 2 15
|
|
|
|
# set initial defaults
|
|
set_defaults()
|
|
{
|
|
network_set_defaults
|
|
media_set_defaults
|
|
INSTALLING="yes"
|
|
mkdir -p ${TMP}
|
|
cp /stand/etc/* /etc
|
|
}
|
|
|
|
# Print welcome banner.
|
|
welcome()
|
|
{
|
|
dialog --title "Welcome to FreeBSD!" --msgbox \
|
|
"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
|
|
where you put the distribution media! :-) Please remove the cpio
|
|
floppy from the drive and press return." -1 -1
|
|
}
|
|
|
|
do_last_config()
|
|
{
|
|
DONE=""
|
|
while [ "${DONE}" = "" ]; do
|
|
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\
|
|
Please select one of the following options:" -1 -1 5 \
|
|
"tzsetup" "Configure your time zone" \
|
|
"network" "Configure networking" \
|
|
"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.$$
|
|
RETVAL=$?
|
|
CHOICE=`cat ${TMP}/menu.tmp.$$`
|
|
rm -f ${TMP}/menu.tmp.$$
|
|
if ! handle_rval ${RETVAL}; then exit 0; fi
|
|
|
|
case ${CHOICE} in
|
|
tzsetup)
|
|
dialog --clear
|
|
sh /stand/tzsetup
|
|
dialog --clear
|
|
;;
|
|
|
|
network)
|
|
network_setup
|
|
;;
|
|
|
|
user)
|
|
sh /stand/adduser.sh -i
|
|
;;
|
|
|
|
guest)
|
|
sh /stand/adduser.sh
|
|
;;
|
|
|
|
done)
|
|
DONE="yes"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
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
|
|
|
|
Any install-related comments to jkh@freebsd.org, phk@freebsd.org or
|
|
paul@freebsd.org.
|
|
|
|
We sincerely hope you enjoy FreeBSD 2.0!
|
|
|
|
The FreeBSD Project Team" -1 -1
|
|
}
|
|
|
|
welcome
|
|
set_defaults
|
|
|
|
while [ "${INSTALLING}" = "yes" ]; do
|
|
if media_select_distribution; then
|
|
if media_chose; then
|
|
for xx in ${MEDIA_DISTRIBUTIONS}; do
|
|
MEDIA_DISTRIBUTION=`eval echo \`echo $xx\``
|
|
media_install_set
|
|
done
|
|
fi
|
|
else
|
|
do_last_config
|
|
INSTALLING="no"
|
|
fi
|
|
done
|
|
echo; echo "Spawning shell. Exit shell to continue with new bindist."
|
|
echo "Progress <installation completed>" > /dev/ttyv1
|
|
/stand/sh
|
|
exit 20
|