From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 16:35:49 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 4244F1065670; Tue, 25 Oct 2011 16:35:49 +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 31AD58FC0C; Tue, 25 Oct 2011 16:35:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PGZnI6005546; Tue, 25 Oct 2011 16:35:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PGZnRd005544; Tue, 25 Oct 2011 16:35:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110251635.p9PGZnRd005544@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 25 Oct 2011 16:35:49 +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: r226741 - 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: Tue, 25 Oct 2011 16:35:49 -0000 Author: nwhitehorn Date: Tue Oct 25 16:35:48 2011 New Revision: 226741 URL: http://svn.freebsd.org/changeset/base/226741 Log: Provide an error message and error handling if there are no network interfaces in the system. This is a non-fatal error except when doing a network installation. PR: bin/161950 MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/netconfig Modified: head/usr.sbin/bsdinstall/scripts/netconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig Tue Oct 25 16:35:08 2011 (r226740) +++ head/usr.sbin/bsdinstall/scripts/netconfig Tue Oct 25 16:35:48 2011 (r226741) @@ -49,6 +49,13 @@ for IF in `ifconfig -l`; do DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" done +if [ -z "$INTERFACES" ]; then + dialog --backtitle 'FreeBSD Installer' \ + --title 'Network Configuration Error' \ + --msgbox 'No network interfaces present to configure.' 0 0 + exit 1 +fi + exec 3>&1 INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3` if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi