aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net.Linux/iwconfig.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/net.Linux/iwconfig.sh b/net.Linux/iwconfig.sh
index c29046e5..4c2dccce 100644
--- a/net.Linux/iwconfig.sh
+++ b/net.Linux/iwconfig.sh
@@ -422,20 +422,21 @@ iwconfig_scan() {
# Strip any duplicates
local i=0 k=1 a= b=
while [ ${i} -lt ${APS} ] ; do
- k=$((${i} + 1))
- while [ ${k} -le ${APS} ] ; do
+ k=$((${i} + 1))
+ while [ ${k} -le ${APS} ] ; do
eval a=\$MAC_${i}
eval b=\$MAC_${k}
if [ "${a}" = "${b}" ] ; then
- eval a=\$QUALITY_${i}
- eval b=\$QUALITY_${k}
+ eval a=\$QUALITY_${i}
+ eval b=\$QUALITY_${k}
local u=${k}
- [ -n "${a}" -a -n "${b}" -a "${a}" -lt "${b}" ] && u=${i}
+ # We need to split this into two tests, otherwise bash errors
+ [ -n "${a}" -a -n "${b}" ] && [ "${a}" -lt "${b}" ] && u=${i}
unset MAC_${u} SSID_${u} CHAN_${u} QUALITY_${u} ENC_${u}
fi
k=$((${k} + 1))
- done
- i=$((${i} + 1))
+ done
+ i=$((${i} + 1))
done
local i=0 e= m= black= s=