summaryrefslogtreecommitdiff
path: root/net.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-07-21 22:35:34 +0000
committerRoy Marples <roy@marples.name>2007-07-21 22:35:34 +0000
commit9211d8b3dba78e03e09ee56d839e392fc13bf1c0 (patch)
treef634af64ddfea428280d34c521f7da130ec072d7 /net.Linux
parent6343b488938a9ba4d53252c9021905ead5bf189a (diff)
downloadopenrc-9211d8b3dba78e03e09ee56d839e392fc13bf1c0.tar.gz
openrc-9211d8b3dba78e03e09ee56d839e392fc13bf1c0.tar.bz2
openrc-9211d8b3dba78e03e09ee56d839e392fc13bf1c0.tar.xz
Work around a bash evaluation error
Diffstat (limited to 'net.Linux')
-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 c29046e..4c2dccc 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=