From fc824c3ace0745d8dc75767ed7a46fdd3b4f1666 Mon Sep 17 00:00:00 2001 From: jkh Date: Mon, 21 Nov 1994 05:36:01 +0000 Subject: [PATCH] Wasn't unmounting media in-between extractions. Fixed. --- release/instdist.sh | 19 ++++++++++++------- release/netinst.sh | 11 +++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/release/instdist.sh b/release/instdist.sh index c3a1c99666f5..7446b5c6cdfb 100644 --- a/release/instdist.sh +++ b/release/instdist.sh @@ -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.18 1994/11/21 04:35:23 jkh Exp $ +# $Id: instdist.sh,v 1.19 1994/11/21 04:47:28 jkh Exp $ if [ "$_INSTINST_SH_LOADED_" = "yes" ]; then return 0 @@ -33,7 +33,7 @@ media_set_defaults() media_device="" media_distribution="" distrib_subdir="" - clear="--clear" + clear="" ipaddr="" hostname="" ether_intr="" @@ -196,10 +196,12 @@ media_install_set() case $media_type in cdrom|nfs|ufs|doshd) message "Extracting ${media_distribution} using ${media_type}." - cd ${media_device}/${media_distribution} - media_extract_dist - cd / - umount ${MNT} + if ! cd ${media_device}/${media_distribution}; then + error "Unable to cd to ${media_device}/${media_distribution} directory." + else + media_extract_dist + cd / + fi return ;; @@ -225,6 +227,7 @@ media_install_set() while [ "$copying" = "yes" ]; do if dialog --title "Insert distribution diskette" \ $clear --yesno "Please enter the next diskette and press OK to continue or Cancel if finished" -1 -1; then + umount ${MNT} > /dev/null 2>&1 if ! mount_msdos ${media_device} ${MNT}; then error "Unable to mount floppy! Please correct." else @@ -403,6 +406,7 @@ system? FreeBSD supports the following types:\n" -1 -1 2 \ media_device=/dev/mcd0a ;; esac + umount ${MNT} > /dev/null 2>&1 if ! mount_cd9660 $media_device ${MNT} > /dev/ttyv1 2>&1; then error "Unable to mount $media_device on ${MNT}" media_device="" @@ -422,11 +426,11 @@ For the "A" floppy drive, it's /dev/fd0, for the "B" floppy drive it's /dev/fd1\n"; then media_device=$answer if echo $media_device | grep -q -v 'fd://'; then + umount ${MNT} > /dev/null 2>&1 if ! mount_msdos $media_device ${MNT} > /dev/ttyv1 2>&1; then error "Unable to mount $media_device" media_device="" else - message "$media_device mounted successfully" media_type=doshd media_device=${MNT} media_get_possible_subdir @@ -468,6 +472,7 @@ Options, if any, should be separated by commas."; then fi media_type=nfs nfs_path=$answer + umount ${MNT} > /dev/null 2>&1 if ! mount_nfs $nfs_options $nfs_path ${MNT} > /dev/ttyv1 2>&1; then error "Unable to mount $nfs_path" else diff --git a/release/netinst.sh b/release/netinst.sh index 585ee081e790..1a958cffb2d4 100644 --- a/release/netinst.sh +++ b/release/netinst.sh @@ -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: netinst.sh,v 1.7 1994/11/18 19:09:33 jkh Exp $ +# $Id: netinst.sh,v 1.8 1994/11/21 04:35:26 jkh Exp $ if [ "$_NETINST_SH_LOADED_" = "yes" ]; then return 0 @@ -48,6 +48,7 @@ network_setup_ether() network_setup_slip() { + csave=$clear clear="" default_value="" if ! network_dialog "What is the IP number for the remote host?"; then return 1; fi @@ -61,7 +62,7 @@ network_setup_slip() default_value=$serial_speed if ! network_dialog "What speed is the serial interface?"; then return 1; fi serial_speed=$answer - clear="--clear" + clear="$csave" if dialog $clear --title "Dial" --yesno "Do you need to dial the phone or otherwise talk to the modem?" -1 -1; then mkdir -p /var/log @@ -88,7 +89,6 @@ network_setup() { done=0 while [ "$interface" = "" ]; do - clear="--clear" dialog $clear --title "Set up network interface" \ --menu "Please select the type of network connection you have:\n" \ -1 -1 3 \ @@ -116,9 +116,8 @@ network_setup() esac if [ "$interface" = "" ]; then continue; fi - clear="" default_value="" - if ! network_dialog "What is the fully qualified name of this host?"; then clear="--clear"; return 1; fi + if ! network_dialog "What is the fully qualified name of this host?"; then return 1; fi hostname=$answer echo $hostname > /etc/myname hostname $hostname @@ -129,7 +128,7 @@ network_setup() fi default_value="" - if ! network_dialog "What is the IP address of this host?"; then clear="--clear"; return 1; fi + if ! network_dialog "What is the IP address of this host?"; then return 1; fi ipaddr=$answer echo "$ipaddr $hostname `echo $hostname | sed -e 's/\.$domain//'`" >> /etc/hosts