Ticket #60 (closed defect: fixed)
Opened 2 years ago
Last modified 2 years ago
associate_order="forcepreferredonly"
Reported by: | Massimo Fantin <massimo.fantin@alice.it> | Owned by: | roy |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | rc | Version: | |
Keywords: | Cc: |
Description
/lib/rc/net/iwconfig with in /etc/conf.d/net
associate_order="forcepreferredonly"
don't work :
/lib/rc/net/iwconfig.sh: line 519: [: 0: unary operator expected
Attachments
Change History
comment:270 Changed 2 years ago by roy
Changed 2 years ago by Massimo Fantin <massimo.fantin@alice.it>
- attachment start.log added
Log of /etc/init.d/net.ath0 --debug start
comment:271 Changed 2 years ago by Massimo Fantin <massimo.fantin@alice.it>
Created an attachment (id=22)
Log of /etc/init.d/net.ath0 --debug start
comment:272 Changed 2 years ago by roy
Created an attachment (id=23)
Fix APS
This should fix thinks. Let me know!
comment:273 Changed 2 years ago by Massimo Fantin <massimo.fantin@alice.it>
the patch correct the :
/lib/rc/net/iwconfig.sh: line 519: [: 0: unary operator expected
error.
But i can't associate to AP so i direct change iwconfig.sh coping part
from iwconfig_connect_preferred() to
iwconfig_force_preferred()
I have modified /lib/rc/net/iwconfig.sh on this way (work for me but not sure
if the things are to do in my way ...)
--- /lib/rc/net/iwconfig.sh 2008-04-18 21:26:34.000000000 +0200
+++ /home/iwconfig.sh 2008-04-18 21:21:35.000000000 +0200
@@ -524,9 +524,16 @@
fi
i=$((${i} + 1))
done
- if ! ${found_AP}; then
- SSID=${e}
- iwconfig_associate && return 0
+ if ${found_AP}; then
+ SSID=${e}
+ eval mode=\$MODE_${i}
+ eval mac=\$MAC_${i}
+ eval enc=\$ENC_${i}
+ eval freq=\$FREQ_${i}
+ eval chan=\$CHAN_${i}
+ iwconfig_associate "${mode}" "${mac}" "${enc}" "${freq}$
+ "${chan}" && return 0
+ # iwconfig_associate && return 0
fi
done
@@ -610,7 +617,7 @@
iwconfig_configure()
{
- local x= APS=
+ local x= APS=-1
eval SSID=\$ssid_${IFVAR}
# Support old variable
@@ -654,6 +661,7 @@
associate_order=${associate_order:-any}
if [ "${associate_order}" = "forcepreferredonly" ]; then
+ iwconfig_scan
iwconfig_force_preferred && return 0
else
iwconfig_scan return 1
comment:278 Changed 2 years ago by roy
Created an attachment (id=24)
Fix APS and force_preferred
This new patch should fix things.
Yours used scan information, which shouldn't be used in this function.
Let me know if it works!
comment:281 Changed 2 years ago by Massimo Fantin <massimo.fantin@alice.it>
Thanks Work !!
comment:284 Changed 2 years ago by roy
- Status changed from new to resolved
- Resolution set to fixed
Comitted to git.
Could you add --debug to your /etc/init.d/net.XXX start line and attach the output please?