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-11-15 13:40:00 +00:00
# $Id: bininst,v 1.37 1994/11/13 07:27:35 jkh Exp $
1994-11-07 06:23:07 +00:00
# Some useful constants.
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/stand
export PATH
1994-11-11 10:55:02 +00:00
1994-11-07 06:23:07 +00:00
TAR=tar
TAR_FLAGS=xvf
1994-11-11 10:55:02 +00:00
1994-11-07 11:30:15 +00:00
TMP=/tmp
1994-11-11 10:55:02 +00:00
1994-11-07 13:43:27 +00:00
IFCONFIG=ifconfig
1994-11-11 10:55:02 +00:00
1994-11-08 12:34:57 +00:00
ROUTE=route
ROUTE_FLAGS="add default"
1994-11-11 10:55:02 +00:00
1994-11-08 11:14:45 +00:00
HOME=/
export HOME
1994-11-06 04:07:41 +00:00
1994-11-11 10:55:02 +00:00
1994-11-11 07:33:50 +00:00
interrupt() {
if dialog --clear --title "User Interrupt Requested" \
--yesno "Do you wish to abort the installation?" 5 70; then
exit 0;
fi
}
# Deal with trigger-happy users.
trap interrupt 1 2 15
1994-11-07 13:43:27 +00:00
# Set the initial state of the system.
1994-11-06 04:07:41 +00:00
set_defaults() {
1994-11-09 23:02:11 +00:00
media_type=""
media_device=""
clear="--clear"
ipaddr=""
hostname=""
ether_intr=""
domain=""
netmask="0xffffff00"
ifconfig_flags=""
remote_hostip=""
tmp_dir="/usr/tmp"
ftp_path="ftp://ftp.freebsd.org/pub/FreeBSD/2.0-ALPHA/bindist"
nfs_path=""
cdrom_path=""
serial_interface="/dev/tty00"
serial_speed="38400"
installing=1
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
# Handle the return value from a dialog, doing some pre-processing
# so that each client doesn't have to.
1994-11-06 04:07:41 +00:00
handle_rval() {
case $1 in
0)
return 0
;;
255)
1994-11-07 13:43:27 +00:00
PS1="subshell# " /stand/sh
1994-11-06 04:07:41 +00:00
;;
*)
return 1
;;
esac
}
1994-11-07 13:43:27 +00:00
# A simple user-confirmation dialog.
1994-11-07 06:23:07 +00:00
confirm() {
1994-11-11 08:33:04 +00:00
dialog --title "User Confirmation" --msgbox "$*" 8 72
1994-11-07 06:23:07 +00:00
}
1994-11-08 18:36:46 +00:00
# A simple message box dialog.
message() {
dialog --title "Progress" --infobox "$*" 5 72
}
1994-11-07 13:43:27 +00:00
# A simple error dialog.
1994-11-07 06:23:07 +00:00
error() {
dialog --title "Error!" --msgbox "$*" 10 72
}
1994-11-07 13:43:27 +00:00
# Something isn't supported yet! :-(
1994-11-06 04:07:41 +00:00
not_supported() {
1994-11-07 06:23:07 +00:00
dialog --title "Sorry!" \
1994-11-07 13:43:27 +00:00
--msgbox "This feature is not supported in the current version of the \
installation tools. Barring some sort of fatal accident, we do \
expect it to be in the release. Please press RETURN to go on." 10 60
1994-11-06 04:07:41 +00:00
}
1994-11-13 03:48:55 +00:00
# Get a string from the user
input()
1994-11-09 23:02:11 +00:00
{
1994-11-13 03:48:55 +00:00
dialog --title "$title" $clear \
1994-11-13 06:32:40 +00:00
--inputbox "$*" 17 72 "$default_value" 2> ${TMP}/inputbox.tmp.$$
1994-11-13 03:48:55 +00:00
if ! handle_rval $?; then rm -f ${TMP}/inputbox.tmp.$$; return 1; fi
1994-11-09 23:02:11 +00:00
answer=`cat ${TMP}/inputbox.tmp.$$`
rm -f ${TMP}/inputbox.tmp.$$
}
1994-11-13 03:48:55 +00:00
# Ask a networking question
network_dialog()
{
title="Network Configuration"
if ! input "$*"; then return 1; fi
}
1994-11-07 13:43:27 +00:00
# Print welcome banner.
1994-11-06 04:07:41 +00:00
welcome() {
1994-11-10 05:27:57 +00:00
dialog --title "Welcome to FreeBSD!" $clear \
1994-11-08 11:14:45 +00:00
--msgbox " We're now ready to install one or more packed distribution
sets onto your machine. At the minimum, you need a bindist
1994-11-09 02:49:04 +00:00
distribution, though a secrdist is also useful if you want your
1994-11-08 11:14:45 +00:00
system to use the same DES and/or Kerberos security model used
1994-11-11 10:55:02 +00:00
by other commercial systems (though the md5 based FreeBSD model
is not bad in and of itself). The secrdist is also a bit of a
special case since it cannot be legally obtained via U.S. ftp
sites from outside the U.S. due to export restrictions, but
non-U.S. versions are also available. See the release notes for
more information on obtaining a secrdist for your part of the
1994-11-10 05:27:57 +00:00
world. If you wish to run a 1.x binary (and can't simply recompile
it from source), it's also recommended that you install the
compat1xdist. If you're interested in doing FreeBSD development,
a srcdist is also very highly recommended! Finally, many useful
pre-compiled packages are available and may be obtained from:
ftp://ftp.freebsd.org/pub/FreeBSD/2.0-ALPHA/packages" 22 72
1994-11-06 04:07:41 +00:00
if ! handle_rval $?; then return 1; fi
}
1994-11-07 13:43:27 +00:00
# Get values into $media_type and $media_device. Call network initialization
# if necessary.
1994-11-06 04:07:41 +00:00
choose_media() {
while [ "$media_device" = "" ]; do
1994-11-09 23:02:11 +00:00
dialog $clear --title "Installation From" \
1994-11-09 02:49:04 +00:00
--menu "Before installing a distribution, you need to chose \n\
and/or configure your method of installation. Please pick from \n\
one of the following options. If none of the listed options works \n\
for you then your best bet may be to simply hit ESC twice to get \n\
a subshell and proceed manually on your own. If you are already \n\
finished with installation, select cancel to go on.\n\n\
1994-11-13 01:20:37 +00:00
Please choose one of the following:" 20 72 7 \
"?Kern" "Please show me the kernel boot messages again!" \
1994-11-10 23:43:25 +00:00
"Tape" "Load distribution from SCSI, QIC or floppy tape" \
1994-11-09 02:49:04 +00:00
"CDROM" "Load distribution from SCSI or Mitsumi CDROM" \
1994-11-06 04:07:41 +00:00
"DOS" "Load from DOS floppies or a DOS hard disk partition" \
1994-11-09 02:49:04 +00:00
"FTP" "Load distribution using FTP" \
1994-11-13 01:20:37 +00:00
"UFS" "Load the distribution from existing UFS partition" \
1994-11-07 11:30:15 +00:00
"NFS" "Load the distribution over NFS" 2> ${TMP}/menu.tmp.$$
1994-11-06 04:07:41 +00:00
retval=$?
1994-11-07 11:30:15 +00:00
choice=`cat ${TMP}/menu.tmp.$$`
rm -f ${TMP}/menu.tmp.$$
1994-11-06 04:07:41 +00:00
if ! handle_rval $retval; then return 1; fi
case $choice in
1994-11-13 01:20:37 +00:00
?Kern)
if dmesg > ${TMP}/dmesg.out; then
dialog $clear \
--title "What do I have in this machine again?" \
1994-11-13 03:48:55 +00:00
--textbox ${TMP}/dmesg.out 22 76
1994-11-13 01:20:37 +00:00
else
error "Couldn't get dmesg information! :-("
fi
;;
1994-11-06 04:07:41 +00:00
Tape)
1994-11-09 23:02:11 +00:00
dialog $clear --title "Chose Tape Type" \
1994-11-06 04:07:41 +00:00
--menu "Which type of tape drive do you have attached to your \n\
system? FreeBSD supports the following types:\n\n\
1994-11-10 23:43:25 +00:00
Choose one of the following:" 20 72 3 \
1994-11-08 07:24:51 +00:00
"SCSI" "SCSI tape drive attached to supported SCSI controller" \
1994-11-06 04:07:41 +00:00
"QIC" "QIC tape drive (Colorado Jumbo, etc)" \
1994-11-10 23:43:25 +00:00
"floppy" "Floppy tape drive" \
1994-11-07 11:30:15 +00:00
2> ${TMP}/menu.tmp.$$
1994-11-06 04:07:41 +00:00
retval=$?
1994-11-07 11:30:15 +00:00
choice=`cat ${TMP}/menu.tmp.$$`
rm -f ${TMP}/menu.tmp.$$
1994-11-06 04:07:41 +00:00
if ! handle_rval $retval; then continue; fi
media_type=tape;
case $choice in
SCSI)
media_device=/dev/rst0
;;
QIC)
media_device=/dev/rwt0
;;
1994-11-10 23:43:25 +00:00
floppy)
media_device=ftape
;;
1994-11-06 04:07:41 +00:00
esac
;;
1994-11-13 01:20:37 +00:00
1994-11-06 04:07:41 +00:00
CDROM)
1994-11-09 23:02:11 +00:00
dialog $clear --title "Chose CDROM Type" \
1994-11-07 06:23:07 +00:00
--menu "Which type of CDROM drive do you have attached to your \n\
system? FreeBSD supports the following types:\n\n\
Choose one of the following:" 15 72 2 \
1994-11-08 07:24:51 +00:00
"SCSI" "SCSI CDROM drive attached to supported SCSI controller" \
1994-11-07 06:23:07 +00:00
"Mitsumi" "Mitsumi CDROM drive" \
1994-11-07 11:30:15 +00:00
2> ${TMP}/menu.tmp.$$
1994-11-07 06:23:07 +00:00
retval=$?
1994-11-07 11:30:15 +00:00
choice=`cat ${TMP}/menu.tmp.$$`
rm -f ${TMP}/menu.tmp.$$
1994-11-07 06:23:07 +00:00
if ! handle_rval $retval; then continue; fi
media_type=cdrom;
case $choice in
SCSI)
1994-11-15 13:40:00 +00:00
media_device=/dev/cd0a
1994-11-07 06:23:07 +00:00
;;
Mitsumi)
1994-11-15 13:40:00 +00:00
media_device=/dev/mcd0a
1994-11-07 06:23:07 +00:00
;;
esac
1994-11-06 04:07:41 +00:00
;;
1994-11-13 01:20:37 +00:00
1994-11-06 04:07:41 +00:00
DOS)
not_supported
;;
1994-11-13 01:20:37 +00:00
1994-11-06 04:07:41 +00:00
FTP)
1994-11-07 13:43:27 +00:00
if ! setup_network; then continue; fi
1994-11-13 03:48:55 +00:00
title="FTP Installation Information"
default_value="$ftp_path"
if ! input \
"Please specify the machine and directory location of the
1994-11-07 06:23:07 +00:00
distribution you wish to load. This should be either a \"URL style\"
1994-11-09 02:49:04 +00:00
specification (e.g. ftp://ftp.freeBSD.org/pub/FreeBSD/...) or simply
the name of a host to connect to. If only a host name is specified,
the installation assumes that you will properly connect and \"mget\"
1994-11-13 03:48:55 +00:00
the files yourself.\n\n"; then continue; fi
1994-11-06 04:07:41 +00:00
media_type=ftp
1994-11-13 03:48:55 +00:00
media_device=$answer
1994-11-08 11:14:45 +00:00
ftp_path=$media_device
1994-11-06 04:07:41 +00:00
;;
1994-11-13 01:20:37 +00:00
1994-11-06 04:07:41 +00:00
NFS)
1994-11-08 18:36:46 +00:00
if ! setup_network; then continue; fi
1994-11-13 03:48:55 +00:00
title="NFS Installation Information"
default_value="$nfs_path"
if ! input \
"Please specify the machine and directory location of the
1994-11-09 02:49:04 +00:00
distribution you wish to load. This must be in machine:dir
format (e.g. zooey:/a/FreeBSD/bindist). The remote directory
must be be exported to your machine (or globally) for this to
1994-11-13 03:48:55 +00:00
work!\n\n"; then continue; fi
1994-11-08 18:36:46 +00:00
media_type=nfs
1994-11-13 03:48:55 +00:00
nfs_path=$answer
1994-11-08 19:51:50 +00:00
if ! mount_nfs $nfs_path /mnt > /dev/ttyv1 2>&1; then
1994-11-08 18:36:46 +00:00
error "Unable to mount $nfs_path"
else
media_device=$nfs_path
1994-11-08 23:59:04 +00:00
message "$nfs_path mounted successfully"
1994-11-08 18:36:46 +00:00
fi
1994-11-06 04:07:41 +00:00
;;
1994-11-13 01:20:37 +00:00
UFS)
1994-11-13 03:48:55 +00:00
dialog $clear --title "User Intervention Requested" --msgbox "
Please mount the filesystem you wish to use somewhere convenient and
exit the shell when you're through. I'll ask you for the location
of the distribution when we come back." 12 72
dialog --clear
/stand/sh
title="Please enter directory"
default_value="/mnt/bindist"
if input "Ok, now give me the full pathname of the directory where you've got the distribution."; then
if [ ! -f $answer/extract.sh ]; then
error "That's not a valid distribution"
else
media_type=ufs
media_device=$answer
fi
fi
;;
1994-11-06 04:07:41 +00:00
esac
done
}
1994-11-07 13:43:27 +00:00
# Set the location of our temporary unpacking directory.
1994-11-07 06:23:07 +00:00
set_tmpdir()
{
1994-11-13 03:48:55 +00:00
title="Chose temporary directory"
default_value="/usr/tmp"
1994-11-13 06:32:40 +00:00
if ! input \
"Please specify the name of a directory containing enough free
space to hold the temporary files for this distribution. At
minimum, a binary distribution will require around 21MB of
1994-11-08 13:20:15 +00:00
temporary space. At maximum, a srcdist may take 40MB or more.
If the directory you specify does not exist, it will be created
1994-11-09 02:49:04 +00:00
for you. If you do not have enough free space to hold both the
packed and unpacked distribution files, consider using the NFS
or CDROM installation methods as they require no temporary
1994-11-13 03:48:55 +00:00
storage.\n\n"; then return 1; fi
tmp_dir=$answer
1994-11-07 06:23:07 +00:00
mkdir -p $tmp_dir
return 0
}
cd_tmpdir()
{
1994-11-07 13:43:27 +00:00
if ! cd $tmp_dir; then
1994-11-07 06:23:07 +00:00
error "No such file or directory for ${tmp_dir}, sorry! Please fix this and try again."
1994-11-07 13:43:27 +00:00
return 1
1994-11-07 06:23:07 +00:00
fi
}
rm_tmpdir()
{
1994-11-09 23:02:11 +00:00
if dialog --title "Delete contents?" $clear \
1994-11-07 06:23:07 +00:00
--yesno "Do you wish to delete the contents of ${tmp_dir}?" 5 72; then
rm -rf $tmp_dir/*
fi
}
1994-11-07 13:43:27 +00:00
setup_network_ether()
{
1994-11-09 23:02:11 +00:00
dialog $clear --title "Ethernet Interface Name" \
1994-11-09 02:49:04 +00:00
--menu "Please select the type of ethernet interface you have:\n\n" \
1994-11-12 06:12:27 +00:00
20 76 6 \
1994-11-08 07:24:51 +00:00
"ed0" "WD80x3, SMC, Novell NE[21]000 or 3C503 generic NIC at 0x280/5" \
"ed1" "Same as above, but at address 0x300 and IRQ 5" \
1994-11-11 07:33:50 +00:00
"de0" "DEC PCI ethernet adapter (or compatible)" \
1994-11-08 07:24:51 +00:00
"ie0" "AT&T StarLan and EN100 family at 0x360 and IRQ 7" \
"is0" "Isolan 4141-0 or Isolink 4110 at 0x280 and IRQ 7" \
1994-11-08 07:48:05 +00:00
"ze0" "PCMCIA IBM or National card at 0x300 and IRQ 5" \
1994-11-07 13:43:27 +00:00
2> ${TMP}/menu.tmp.$$
retval=$?
interface=`cat ${TMP}/menu.tmp.$$`
rm -f ${TMP}/menu.tmp.$$
if ! handle_rval $retval; then return 1; fi
}
setup_network_slip()
{
1994-11-09 23:02:11 +00:00
clear=""
1994-11-09 02:49:04 +00:00
default_value=""
1994-11-11 10:55:02 +00:00
if ! network_dialog "What is the IP number for the remote host?"; then return 1; fi
1994-11-09 02:49:04 +00:00
remote_hostip=$answer
interface=sl0
1994-11-07 13:43:27 +00:00
1994-11-09 02:49:04 +00:00
default_value=$serial_interface
1994-11-11 10:55:02 +00:00
if ! network_dialog "What is the name of the serial interface?"; then return 1; fi
1994-11-09 02:49:04 +00:00
serial_interface=$answer
default_value=$serial_speed
1994-11-11 10:55:02 +00:00
if ! network_dialog "What speed is the serial interface?"; then return 1; fi
1994-11-09 02:49:04 +00:00
serial_speed=$answer
1994-11-09 23:02:11 +00:00
clear="--clear"
1994-11-11 08:33:04 +00:00
if dialog $clear --title "Dial" --yesno "Do you need to dial the phone or otherwise talk to the modem?"; then
1994-11-11 08:34:03 +00:00
mkdir -p /var/log
1994-11-12 05:04:21 +00:00
touch -f /var/log/aculog > /dev/null 2>&1
chmod 666 /var/log/aculog > /dev/null 2>&1
1994-11-11 08:33:04 +00:00
confirm "You may now dialog with your modem and set up the slip connection.\nBe sure to disable DTR sensitivity (usually with AT&D0) or the modem may\nhang up when you exit 'cu'. Use ~. to exit cu and continue."
dialog --clear
cu -l $serial_interface -s $serial_speed
dialog --clear
fi
1994-11-07 13:43:27 +00:00
}
setup_network_plip()
{
1994-11-08 11:14:45 +00:00
default_value=""
1994-11-11 10:55:02 +00:00
if ! network_dialog "What is the IP number for the remote host?"; then return 1; fi
1994-11-08 11:14:45 +00:00
remote_hostip=$answer
1994-11-08 12:45:04 +00:00
interface=lp0
1994-11-08 11:14:45 +00:00
}
1994-11-07 13:43:27 +00:00
setup_network()
{
done=0
while [ "$interface" = "" ]; do
1994-11-10 05:27:57 +00:00
clear="--clear"
1994-11-09 23:02:11 +00:00
dialog $clear --title "Set up network interface" \
1994-11-08 18:36:46 +00:00
--menu "Please select the type of network connection you have:\n\n" \
1994-11-10 05:27:57 +00:00
15 72 3 \
1994-11-08 18:36:46 +00:00
"ether" "A supported ethernet card" \
"SLIP" "A point-to-point SLIP (Serial Line IP) connection" \
"PLIP" "A Parallel-Line IP setup (sort of like lap-link)" \
2> ${TMP}/menu.tmp.$$
1994-11-07 13:43:27 +00:00
1994-11-08 18:36:46 +00:00
retval=$?
choice=`cat ${TMP}/menu.tmp.$$`
rm -f ${TMP}/menu.tmp.$$
if ! handle_rval $retval; then return 1; fi
case $choice in
ether)
1994-11-10 05:27:57 +00:00
if ! setup_network_ether; then continue; fi
;;
SLIP)
if ! setup_network_slip; then continue; fi
;;
PLIP)
if ! setup_network_plip; then continue; fi
;;
esac
if [ "$interface" = "" ]; then continue; fi
clear=""
default_value=""
1994-11-11 10:55:02 +00:00
if ! network_dialog "What is the fully qualified name of this host?"; then clear="--clear"; return 1; fi
1994-11-10 05:27:57 +00:00
hostname=$answer
echo $hostname > /etc/myname
hostname $hostname
default_value=`echo $hostname | sed -e 's/[^.]*\.//'`
1994-11-11 10:55:02 +00:00
if network_dialog "What is the domain name of this host (Internet, not YP/NIS)?"; then
1994-11-10 05:27:57 +00:00
domain=$answer
fi
1994-11-08 11:14:45 +00:00
1994-11-10 05:27:57 +00:00
default_value=""
1994-11-11 10:55:02 +00:00
if ! network_dialog "What is the IP address of this host?"; then clear="--clear"; return 1; fi
1994-11-10 05:27:57 +00:00
ipaddr=$answer
1994-11-08 11:14:45 +00:00
1994-11-10 05:27:57 +00:00
echo "$ipaddr $hostname `echo $hostname | sed -e 's/\.$domain//'`" >> /etc/hosts
1994-11-08 11:14:45 +00:00
1994-11-10 05:27:57 +00:00
default_value="$netmask"
if network_dialog "Please specify the netmask"; then
if [ "$answer" != "" ]; then
netmask=$answer
fi
1994-11-08 13:08:18 +00:00
fi
1994-11-07 13:43:27 +00:00
1994-11-10 05:27:57 +00:00
default_value=""
if network_dialog "Any extra flags to ifconfig?" ; then
ifconfig_flags=$answer
fi
echo "Progress <$IFCONFIG $interface $ipaddr $remote_hostip netmask $netmask $ifconfig_flags>" >/dev/ttyv1
if ! $IFCONFIG $interface $ipaddr $remote_hostip netmask $netmask $ifconfig_flags > /dev/ttyv1 2>&1 ; then
error "Unable to configure interface $interface"
ipaddr=""; interface=""
continue
fi
if [ "$interface" = "sl0" ]; then
slattach -a -s $serial_speed $serial_interface
fi
echo "$ipaddr $remote_hostip netmask $netmask $ifconfig_flags" > /etc/hostname.$interface
default_value=""
if network_dialog "If you have a default gateway, enter its IP address"; then
if [ "$answer" != "" ]; then
gateway=$answer
echo "Progress <$ROUTE $ROUTE_FLAGS $gateway>" > /dev/ttyv1 2>&1
$ROUTE $ROUTE_FLAGS $gateway > /dev/ttyv1 2>&1
fi
1994-11-08 13:08:18 +00:00
fi
1994-11-07 13:43:27 +00:00
1994-11-10 05:27:57 +00:00
default_value=""
if network_dialog "If you have a name server, enter its IP address"; then
if [ "$answer" != "" ]; then
nameserver=$answer
1994-11-11 07:33:50 +00:00
echo "domain $domain" > /etc/resolv.conf
echo "nameserver $nameserver" >> /etc/resolv.conf
1994-11-10 05:27:57 +00:00
fi
1994-11-08 13:08:18 +00:00
fi
1994-11-07 13:43:27 +00:00
done
}
1994-11-08 18:36:46 +00:00
extract_dist()
{
if [ -f extract.sh ]; then
1994-11-09 02:49:04 +00:00
message "Extracting distribution.. Please wait!"
1994-11-13 07:27:36 +00:00
sh ./extract.sh < /dev/ttyv1 > /dev/ttyv1 2>&1
1994-11-08 18:36:46 +00:00
else
error "Improper distribution. No installation script found."
fi
}
1994-11-06 04:07:41 +00:00
install_set()
{
1994-11-07 06:23:07 +00:00
case $media_type in
tape)
1994-11-07 13:43:27 +00:00
if ! set_tmpdir; then return; fi
if ! cd_tmpdir; then return; fi
1994-11-07 06:23:07 +00:00
confirm "Please mount tape for ${media_device}."
1994-11-10 23:43:25 +00:00
if [ "$media_device" = "ftape" ]; then
dialog --title "Results of tape extract" $clear \
--prgbox "ft | $TAR $TAR_FLAGS -" 10 72
else
dialog --title "Results of tape extract" $clear \
--prgbox "$TAR $TAR_FLAGS $media_device" 10 72
fi
1994-11-08 18:36:46 +00:00
extract_dist
1994-11-07 06:23:07 +00:00
rm_tmpdir
;;
cdrom)
1994-11-12 06:22:25 +00:00
if ! mount_cd9660 $media_device /mnt > /dev/ttyv1 2>&1; then
1994-11-08 18:36:46 +00:00
error "Unable to mount $media_device on /mnt"
else
1994-11-13 03:48:55 +00:00
title="CDROM Information"
default_value="$cdrom_path"
if ! input "Directory on CD containing distribution"; then return; fi
cdrom_path=$answer
1994-11-08 18:36:46 +00:00
cd /mnt/$cdrom_path
extract_dist
fi
1994-11-07 06:23:07 +00:00
return
;;
dos)
1994-11-07 13:43:27 +00:00
if ! set_tmpdir; then return; fi
if ! cd_tmpdir; then return; fi
1994-11-07 06:23:07 +00:00
not_supported
return
;;
ftp)
1994-11-07 13:43:27 +00:00
if ! set_tmpdir; then return; fi
if ! cd_tmpdir; then return; fi
1994-11-07 06:23:07 +00:00
if ! echo $media_device | grep -v 'ftp://'; then
1994-11-11 10:55:02 +00:00
message "Fetching distribution using ncftp. Use ALT-F2 to see output, ALT-F1 to return."
1994-11-11 23:29:26 +00:00
if ! ncftp $media_device/* < /dev/null > /dev/ttyv1 2>&1; then
1994-11-07 06:23:07 +00:00
error "Couldn't fetch distribution from ${media_device}!"
else
1994-11-08 18:36:46 +00:00
extract_dist
1994-11-07 06:23:07 +00:00
fi
else
1994-11-08 18:36:46 +00:00
dialog --clear
1994-11-07 06:23:07 +00:00
ftp $media_device
1994-11-08 18:36:46 +00:00
dialog --clear
extract_dist
1994-11-07 06:23:07 +00:00
fi
rm_tmpdir
return
;;
nfs)
1994-11-08 23:59:04 +00:00
message "Extracting from NFS directory"
1994-11-08 18:36:46 +00:00
cd /mnt
extract_dist
cd /
umount /mnt > /dev/tty1 2>&1
1994-11-07 06:23:07 +00:00
return
;;
1994-11-13 03:48:55 +00:00
ufs)
message "Unpacking from prepared UFS directory"
cd $media_device
extract_dist
cd /
;;
1994-11-07 06:23:07 +00:00
esac
1994-11-06 04:07:41 +00:00
}
1994-11-08 07:24:51 +00:00
do_last_config()
{
1994-11-08 12:34:57 +00:00
dialog --title "Auf Wiedersehen!" \
1994-11-08 07:24:51 +00:00
--msgbox "We now come to the end of the installation. At this point in
time, there's nothing fancy here, but for the release we plan to
1994-11-08 11:14:45 +00:00
ask some additional questions about time zone setup, what sort of
mail client this host is, etc. We just ran out of time for ALPHA!
At the very least, you may wish to check out the 'tzsetup' command;
1994-11-09 00:10:04 +00:00
it will at least handle the first checklist item for you. \n
The login name \"root\" has no password. If you're new to UN*X, log
1994-11-09 02:49:04 +00:00
in as root when prompted for a user name and run vipw to add a new
1994-11-09 20:16:09 +00:00
user for yourself.
Any install-related comments to jkh, phk or paul (@freebsd.org)." 18 72
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-07 06:23:07 +00:00
while [ $installing -eq 1 ]; do
1994-11-06 04:07:41 +00:00
if choose_media; then
install_set
1994-11-07 06:23:07 +00:00
media_device=""; media_type=""
1994-11-06 04:07:41 +00:00
else
1994-11-08 07:24:51 +00:00
do_last_config
1994-11-07 06:23:07 +00:00
installing=0
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