mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Adapt to new wireless scheme where base wlan interfaces do not show up in
ifconfig anymore.
This commit is contained in:
parent
f23ba0f0e9
commit
159ca5c844
1 changed files with 13 additions and 8 deletions
|
|
@ -41,19 +41,24 @@ DIALOG_TAGS=""
|
||||||
: ${DIALOG_ITEM_HELP=4}
|
: ${DIALOG_ITEM_HELP=4}
|
||||||
: ${DIALOG_ESC=255}
|
: ${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
|
for IF in `ifconfig -l`; do
|
||||||
test "$IF" = "lo0" && continue
|
test "$IF" = "lo0" && continue
|
||||||
(ifconfig -g wlan | egrep -wq $IF) && continue
|
(ifconfig -g wlan | egrep -wq $IF) && continue
|
||||||
INTERFACES="$INTERFACES $IF"
|
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`
|
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\""
|
DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\""
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue