svn commit: r218332 - user/nwhitehorn/bsdinstall/scripts

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sat Feb 5 16:37:36 UTC 2011


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 \


More information about the svn-src-user mailing list