From owner-svn-src-all@FreeBSD.ORG Mon Mar 28 02:37:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16008106564A; Mon, 28 Mar 2011 02:37:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 019D98FC08; Mon, 28 Mar 2011 02:37:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2S2b5mk077040; Mon, 28 Mar 2011 02:37:05 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2S2b5Vt077038; Mon, 28 Mar 2011 02:37:05 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103280237.p2S2b5Vt077038@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 28 Mar 2011 02:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220088 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2011 02:37:06 -0000 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