projects
/
grml-network.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
71a3afd
)
Fix array usage
mru/fixup
author
Ulrich Dangel
<mru@grml.org>
Thu, 22 Dec 2011 20:49:50 +0000
(21:49 +0100)
committer
Ulrich Dangel
<mru@grml.org>
Thu, 22 Dec 2011 20:50:16 +0000
(21:50 +0100)
sbin/netcardconfig
patch
|
blob
|
history
diff --git
a/sbin/netcardconfig
b/sbin/netcardconfig
index
8561dae
..
87e8c68
100755
(executable)
--- a/
sbin/netcardconfig
+++ b/
sbin/netcardconfig
@@
-499,11
+499,11
@@
if [ -z "$WLAN" ] ; then
WLAN_OLD=$(tail -n +3 /proc/net/wireless 2>/dev/null|awk -F: '{print $1}')
# /proc/net/wireless does not work e.g. with iwl3945 on kernel 2.6.33 anymore
WLAN_NEW=$(for i in /sys/class/net/* ; do ( [ -d $i/wireless ] || [ -d $i/phy80211 ] ) && basename $i ; done)
WLAN_OLD=$(tail -n +3 /proc/net/wireless 2>/dev/null|awk -F: '{print $1}')
# /proc/net/wireless does not work e.g. with iwl3945 on kernel 2.6.33 anymore
WLAN_NEW=$(for i in /sys/class/net/* ; do ( [ -d $i/wireless ] || [ -d $i/phy80211 ] ) && basename $i ; done)
- set -a WLAN_IWCONFIG
=""
+ set -a WLAN_IWCONFIG
for DEV in $LAN ; do
for DEV in $LAN ; do
- iwconfig $DEV 2>/dev/null 1>&2 && WLAN_IWCONFIG+="$DEV"
+ iwconfig $DEV 2>/dev/null 1>&2 && WLAN_IWCONFIG+=($DEV)
done
done
- WLAN=$(echo $WLAN_OLD $WLAN_NEW ${WLAN_IWCONFIG[
*]}
| sort -u)
+ WLAN=$(echo $WLAN_OLD $WLAN_NEW ${WLAN_IWCONFIG[
@]} | tr ' ' '\n'
| sort -u)
fi
unset LAN_DEVICES WLAN_DEVICES FIREWIRE_DEVICES NETDEVICES WLAN_IWCONFIG
fi
unset LAN_DEVICES WLAN_DEVICES FIREWIRE_DEVICES NETDEVICES WLAN_IWCONFIG