mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-06 18:29:47 +00:00
1. Unify my coding style.
2. Fix a couple of errors that kept media_install_set from working. 3. Fix another error that disabled media_select_distribution
This commit is contained in:
parent
1e0b142e29
commit
c70ce47ad6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4632
@ -13,7 +13,7 @@
|
||||
# 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.41 1994/11/18 10:05:29 jkh Exp $
|
||||
# $Id: bininst,v 1.42 1994/11/18 11:01:22 jkh Exp $
|
||||
|
||||
if [ "$_BININST_LOADED_" = "yes" ]; then
|
||||
echo "Error, $0 loaded more than once!"
|
||||
@ -40,15 +40,17 @@ TMP=/tmp
|
||||
trap interrupt 1 2 15
|
||||
|
||||
# set initial defaults
|
||||
set_defaults() {
|
||||
set_defaults()
|
||||
{
|
||||
media_set_defaults
|
||||
installing=1
|
||||
installing="yes"
|
||||
mkdir -p ${TMP}
|
||||
cp /stand/etc/* /etc
|
||||
}
|
||||
|
||||
# Print welcome banner.
|
||||
welcome() {
|
||||
welcome()
|
||||
{
|
||||
dialog --title "Welcome to FreeBSD!" $clear \
|
||||
--msgbox \
|
||||
"We're now ready to install one or more packed distribution sets onto
|
||||
@ -86,14 +88,14 @@ paul@freebsd.org." -1 -1
|
||||
welcome
|
||||
set_defaults
|
||||
|
||||
while [ $installing -eq 1 ]; do
|
||||
while [ "$installing" = "yes" ]; do
|
||||
if media_select_distribution; then
|
||||
if media_chose; then
|
||||
install_set
|
||||
media_install_set
|
||||
fi
|
||||
else
|
||||
do_last_config
|
||||
installing=0
|
||||
installing="no"
|
||||
fi
|
||||
done
|
||||
echo; echo "Spawning shell. Exit shell to continue with new bindist."
|
||||
|
@ -10,7 +10,7 @@
|
||||
# putting your name on top after doing something trivial like reindenting
|
||||
# it, just to make it look like you wrote it!).
|
||||
#
|
||||
# $Id: instdist.sh,v 1.6 1994/11/18 10:05:44 jkh Exp $
|
||||
# $Id: instdist.sh,v 1.7 1994/11/18 11:01:25 jkh Exp $
|
||||
|
||||
if [ "$_INSTINST_SH_LOADED_" = "yes" ]; then
|
||||
return 0
|
||||
@ -27,7 +27,8 @@ TAR_FLAGS="--unlink -xvf"
|
||||
MNT=/mnt
|
||||
|
||||
# Set the initial state for media installation.
|
||||
media_set_defaults() {
|
||||
media_set_defaults()
|
||||
{
|
||||
media_type=""
|
||||
media_device=""
|
||||
media_distribution=""
|
||||
@ -40,7 +41,7 @@ media_set_defaults() {
|
||||
ifconfig_flags=""
|
||||
remote_hostip=""
|
||||
tmp_dir="/usr/tmp"
|
||||
ftp_path="ftp://ftp.freebsd.org/pub/FreeBSD/2.0-ALPHA"
|
||||
ftp_path="ftp://ftp.freebsd.org/pub/FreeBSD/${DISTNAME}"
|
||||
nfs_path=""
|
||||
nfs_options=""
|
||||
serial_interface="/dev/tty00"
|
||||
@ -232,7 +233,7 @@ media_select_distribution()
|
||||
of installation. Depending on how much hard disk space you have \n\
|
||||
available, you may chose to load one or all of them. Optional \n\
|
||||
and mandatory distributions are so noted. Please also note that \n\
|
||||
the secrdist is NOT FOR EXPORT from the U.S.! Please don't \n\
|
||||
the secrdist is NOT FOR EXPORT from the U.S., so please don't \n\
|
||||
endanger U.S. ftp sites by getting it illegally. Thank you!\n\n" \
|
||||
"Please select one of the following ${DISTNAME} distributions:" -1 -1 10 \
|
||||
"?diskfree" "Uh, first, how much disk space do I have free?" \
|
||||
@ -244,13 +245,13 @@ endanger U.S. ftp sites by getting it illegally. Thank you!\n\n" \
|
||||
"srcdist" "Full sources for everything but DES (optional - $SRCSIZE)" \
|
||||
"secrdist" "DES encryption code (and sources) (optional - $SECRSIZE)" \
|
||||
"compat1xdist" "FreeBSD 1.x binary compatability (optional - $COMPATSIZE)" \
|
||||
"packages" "The ${DISTNAME} optional software distribution (user choice)" \
|
||||
"packages" "Optional binary software distributions (user choice)" \
|
||||
2> ${TMP}/menu.tmp.$$
|
||||
retval=$?
|
||||
media_distribution=`cat ${TMP}/menu.tmp.$$`
|
||||
rm -f ${TMP}/menu.tmp.$$
|
||||
if ! handle_rval $retval; then return 1; fi
|
||||
if [ $media_distribution = "?diskfree" ]; then
|
||||
if [ "$media_distribution" = "?diskfree" ]; then
|
||||
if df -k > ${TMP}/df.out; then
|
||||
dialog $clear \
|
||||
--title "How much free space do I have?" \
|
||||
@ -279,7 +280,8 @@ to the mount point).\n\n"; then
|
||||
|
||||
# Get values into $media_type and $media_device. Call network initialization
|
||||
# if necessary.
|
||||
media_chose() {
|
||||
media_chose()
|
||||
{
|
||||
while [ "$media_device" = "" ]; do
|
||||
|
||||
dialog $clear --title "Installation From" \
|
||||
|
@ -10,7 +10,7 @@
|
||||
# putting your name on top after doing something trivial like reindenting
|
||||
# it, just to make it look like you wrote it!).
|
||||
#
|
||||
# $Id: miscfuncs.sh,v 1.2 1994/11/17 11:53:14 jkh Exp $
|
||||
# $Id: miscfuncs.sh,v 1.3 1994/11/18 11:01:27 jkh Exp $
|
||||
|
||||
if [ "$_MISCFUNCS_SH_LOADED_" = "yes" ]; then
|
||||
return 0
|
||||
@ -38,7 +38,8 @@ SRCSIZE="120MB"
|
||||
SECRSIZE="4MB"
|
||||
COMPATSIZE="3MB"
|
||||
|
||||
interrupt() {
|
||||
interrupt()
|
||||
{
|
||||
if dialog --clear --title "User Interrupt Requested" \
|
||||
--yesno "Do you wish to abort the installation?" -1 -1; then
|
||||
exit 0;
|
||||
@ -47,7 +48,8 @@ interrupt() {
|
||||
|
||||
# Handle the return value from a dialog, doing some pre-processing
|
||||
# so that each client doesn't have to.
|
||||
handle_rval() {
|
||||
handle_rval()
|
||||
{
|
||||
case $1 in
|
||||
0)
|
||||
return 0
|
||||
@ -62,22 +64,26 @@ handle_rval() {
|
||||
}
|
||||
|
||||
# A simple user-confirmation dialog.
|
||||
confirm() {
|
||||
confirm()
|
||||
{
|
||||
dialog --title "User Confirmation" --msgbox "$*" -1 -1
|
||||
}
|
||||
|
||||
# A simple message box dialog.
|
||||
message() {
|
||||
message()
|
||||
{
|
||||
dialog --title "Progress" --infobox "$*" -1 -1
|
||||
}
|
||||
|
||||
# A simple error dialog.
|
||||
error() {
|
||||
error()
|
||||
{
|
||||
dialog --title "Error!" --msgbox "$*" -1 -1
|
||||
}
|
||||
|
||||
# Something isn't supported yet! :-(
|
||||
not_supported() {
|
||||
not_supported()
|
||||
{
|
||||
dialog --title "Sorry!" \
|
||||
--msgbox "This feature is not supported in the current version of the \
|
||||
installation tools. Barring some sort of fatal accident, we do \
|
||||
|
Loading…
x
Reference in New Issue
Block a user