From owner-svn-src-user@FreeBSD.ORG Thu Jan 6 02:36:29 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729E31065672; Thu, 6 Jan 2011 02:36:29 +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 494AE8FC15; Thu, 6 Jan 2011 02:36:29 +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 p062aT3d098775; Thu, 6 Jan 2011 02:36:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p062aTsH098773; Thu, 6 Jan 2011 02:36:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101060236.p062aTsH098773@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 6 Jan 2011 02:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217038 - user/nwhitehorn/bsdinstall/scripts X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2011 02:36:29 -0000 Author: nwhitehorn Date: Thu Jan 6 02:36:29 2011 New Revision: 217038 URL: http://svn.freebsd.org/changeset/base/217038 Log: Check for cntrl-C, errors, user choosing "Don't Save" in partedit, etc. Modified: user/nwhitehorn/bsdinstall/scripts/auto Modified: user/nwhitehorn/bsdinstall/scripts/auto ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/auto Thu Jan 6 02:21:14 2011 (r217037) +++ user/nwhitehorn/bsdinstall/scripts/auto Thu Jan 6 02:36:29 2011 (r217038) @@ -4,8 +4,22 @@ echo "Begun Installation at $(date)" > $ cdialog --backtitle "FreeBSD Installer" --title "Welcome" --msgbox "Welcome to the FreeBSD Installer." 0 0 +checkerror() { + if [ $? -ne 0 ]; then + cdialog --backtitle "FreeBSD Installer" --title "Abort" \ + --no-label "Exit" --yes-label "Restart" --yesno \ + "You have canceled an installation step. Would you like to restart the installation or exit the installer?" 0 0 + if [ $? -ne 0 ]; then + exit + else + exec $0 $@ + fi + fi +} + rm /tmp/rc.conf bsdinstall hostname +checkerror FETCH_DISTRIBUTIONS="" for dist in $DISTRIBUTIONS; do @@ -16,24 +30,31 @@ done if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then cdialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "No installation files were found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0 - bsdinstall netconfig mirrorselect + bsdinstall netconfig + checkerror fi rm $PATH_FSTAB bsdinstall partedit +checkerror bsdinstall mount if [ ! -z $FETCH_DISTRIBUTIONS ]; then ALL_DISTRIBUTIONS=$DISTRIBUTIONS DISTRIBUTIONS=$FETCH_DISTRIBUTIONS bsdinstall distfetch + checkerror DISTRIBUTIONS=$ALL_DISTRIBUTIONS fi bsdinstall distextract +checkerror bsdinstall rootpass +checkerror bsdinstall adduser +checkerror bsdinstall config +checkerror cdialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete!" 0 0