aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2015-12-06 00:20:45 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2015-12-06 00:20:45 +0000
commit159ca5c844cdbbef9cb921bae89aabb2277a8bf3 (patch)
treed8285816c15d4f32f1e7215f87ac58cd030e4240 /usr.sbin
parentf23ba0f0e91a53345cd48ffe0825b6fac5fd5c53 (diff)
downloadsrc-159ca5c844cdbbef9cb921bae89aabb2277a8bf3.tar.gz
src-159ca5c844cdbbef9cb921bae89aabb2277a8bf3.zip
Notes
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/netconfig21
1 files changed, 13 insertions, 8 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig
index d5a14ce2b474..f9913c324228 100755
--- a/usr.sbin/bsdinstall/scripts/netconfig
+++ b/usr.sbin/bsdinstall/scripts/netconfig
@@ -41,19 +41,24 @@ DIALOG_TAGS=""
: ${DIALOG_ITEM_HELP=4}
: ${DIALOG_ESC=255}
-# Do a dirty check to see if this a wireless interface -- there should be a
-# better way
-is_wireless_if() {
- ifconfig $1 | grep -q 'media: IEEE 802.11 Wireless'
-}
-
for IF in `ifconfig -l`; do
test "$IF" = "lo0" && continue
(ifconfig -g wlan | egrep -wq $IF) && continue
INTERFACES="$INTERFACES $IF"
+done
+
+INTERFACES="$INTERFACES $(sysctl -in net.wlan.devices)"
+is_wireless_if() {
+ for IF in $(sysctl -in net.wlan.devices); do
+ if [ $IF = $1 ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+for IF in $INTERFACES; do
DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc`
- is_wireless_if $IF && echo $DESC |
- grep -iqv wireless && DESC="Wireless $DESC"
DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\""
done