Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Feb 2011 16:37:36 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r218332 - user/nwhitehorn/bsdinstall/scripts
Message-ID:  <201102051637.p15Gba3u033880@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 \



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