Detect wlan in descending order

This assumes that there might be the default proprietary wlan on a low number and an Atheros dongle on a higher number
This commit is contained in:
Bob Mottram 2016-10-02 15:37:35 +01:00
parent 6afd2ddf42
commit 235ff251a7
1 changed files with 14 additions and 4 deletions

View File

@ -72,8 +72,18 @@ IFACE='wlan0'
EIFACE=eth0
if [[ $IFACE == "wlan0" ]]; then
if grep -q "wlan1" /proc/net/dev; then
IFACE=wlan1
if grep -q "wlan5" /proc/net/dev; then
IFACE=wlan5
fi
fi
if [[ $IFACE == "wlan0" ]]; then
if grep -q "wlan4" /proc/net/dev; then
IFACE=wlan4
fi
fi
if [[ $IFACE == "wlan0" ]]; then
if grep -q "wlan3" /proc/net/dev; then
IFACE=wlan3
fi
fi
if [[ $IFACE == "wlan0" ]]; then
@ -82,8 +92,8 @@ if [[ $IFACE == "wlan0" ]]; then
fi
fi
if [[ $IFACE == "wlan0" ]]; then
if grep -q "wlan3" /proc/net/dev; then
IFACE=wlan3
if grep -q "wlan1" /proc/net/dev; then
IFACE=wlan1
fi
fi