Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2011 02:37:05 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220088 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201103280237.p2S2b5Vt077038@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Mon Mar 28 02:37:05 2011
New Revision: 220088
URL: http://svn.freebsd.org/changeset/base/220088

Log:
  Improve error handling.

Modified:
  head/usr.sbin/bsdinstall/scripts/auto

Modified: head/usr.sbin/bsdinstall/scripts/auto
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/auto	Mon Mar 28 01:24:20 2011	(r220087)
+++ head/usr.sbin/bsdinstall/scripts/auto	Mon Mar 28 02:37:05 2011	(r220088)
@@ -29,14 +29,14 @@
 echo "Begun Installation at $(date)" > $BSDINSTALL_LOG
 
 error() {
+	test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR
+	test -f $PATH_FSTAB && bsdinstall umount
 	dialog --backtitle "FreeBSD Installer" --title "Abort" \
 	    --no-label "Exit" --yes-label "Restart" --yesno \
 	    "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0
 	if [ $? -ne 0 ]; then
 		exit
 	else
-		test -n $DISTDIR_IS_UNIONFS && umount -f $BSDINSTALL_DISTDIR
-		test -f $PATH_FSTAB && bsdinstall umount
 		exec $0
 	fi
 }
@@ -81,7 +81,7 @@ if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$B
 	NETCONFIG_DONE=yes
 fi
 
-if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then
+if [ -n "$FETCH_DISTRIBUTIONS" ]; then
 	exec 3>&1
 	BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3`
 	MIRROR_BUTTON=$?
@@ -125,8 +125,7 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
 
 	export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
 	# Try to use any existing distfiles
-	if [ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != \
-	    "$ALL_DISTRIBUTIONS" ]; then
+	if [ -d $BSDINSTALL_DISTDIR ]; then
 		DISTDIR_IS_UNIONFS=1
 		mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
 	fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103280237.p2S2b5Vt077038>