From owner-svn-src-user@FreeBSD.ORG Sat Feb 5 16:37:36 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 62D52106566C; Sat, 5 Feb 2011 16:37:36 +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 51AAB8FC1B; Sat, 5 Feb 2011 16:37:36 +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 p15GbaQU033882; Sat, 5 Feb 2011 16:37:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15Gba3u033880; Sat, 5 Feb 2011 16:37:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201102051637.p15Gba3u033880@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 5 Feb 2011 16:37:36 +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: r218332 - 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: Sat, 05 Feb 2011 16:37:36 -0000 Author: nwhitehorn Date: Sat Feb 5 16:37:36 2011 New Revision: 218332 URL: http://svn.freebsd.org/changeset/base/218332 Log: Show an error if no networks were found. Modified: user/nwhitehorn/bsdinstall/scripts/wlanconfig Modified: user/nwhitehorn/bsdinstall/scripts/wlanconfig ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/wlanconfig Sat Feb 5 16:23:32 2011 (r218331) +++ user/nwhitehorn/bsdinstall/scripts/wlanconfig Sat Feb 5 16:37:36 2011 (r218332) @@ -34,6 +34,13 @@ NETWORKS=`echo "$SCAN_RESULTS" | awk -F '/..:..:..:..:..:../ {if (length($5) > 0) printf("\"%s\"\t%s\n", $5, $4);}' | sort | uniq` +if [ -z $SCAN_RESULTS ]; then + dialog --backtitle "FreeBSD Installer" --title "Error" \ + --yesno "No wireless networks were found. Rescan?" 0 0 && \ + exec $0 $@ + exit 1 +fi + exec 3>&1 NETWORK=`sh -c "dialog --extra-button --extra-label \"Rescan\" \ --backtitle \"FreeBSD Installer\" --title \"Network Selection\" --menu \