Fix force_preferred, #60.
This commit is contained in:
parent
d83ae59cca
commit
799686e40d
@ -414,8 +414,9 @@ iwconfig_connect_preferred()
|
|||||||
[ $# = 0 ] && eval set -- $(_flatten_array "preferred_aps")
|
[ $# = 0 ] && eval set -- $(_flatten_array "preferred_aps")
|
||||||
[ $# = 0 ] && return 1
|
[ $# = 0 ] && return 1
|
||||||
|
|
||||||
local ssid= i=0 mode= mac= caps= freq= chan=
|
local ssid= i= mode= mac= caps= freq= chan=
|
||||||
for ssid; do
|
for ssid; do
|
||||||
|
i=0
|
||||||
while [ ${i} -le ${APS} ] ; do
|
while [ ${i} -le ${APS} ] ; do
|
||||||
eval e=\$SSID_${i}
|
eval e=\$SSID_${i}
|
||||||
if [ "${e}" = "${ssid}" ] ; then
|
if [ "${e}" = "${ssid}" ] ; then
|
||||||
@ -484,7 +485,7 @@ iwconfig_defaults()
|
|||||||
|
|
||||||
iwconfig_configure()
|
iwconfig_configure()
|
||||||
{
|
{
|
||||||
local x APS
|
local x= APS=-1
|
||||||
eval SSID=\$ssid_${IFVAR}
|
eval SSID=\$ssid_${IFVAR}
|
||||||
|
|
||||||
# Setup ad-hoc mode?
|
# Setup ad-hoc mode?
|
||||||
|
@ -525,7 +525,7 @@ iwconfig_force_preferred()
|
|||||||
i=$((${i} + 1))
|
i=$((${i} + 1))
|
||||||
done
|
done
|
||||||
if ! ${found_AP}; then
|
if ! ${found_AP}; then
|
||||||
SSID=${e}
|
SSID=${ssid}
|
||||||
iwconfig_associate && return 0
|
iwconfig_associate && return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -610,7 +610,7 @@ iwconfig_defaults()
|
|||||||
|
|
||||||
iwconfig_configure()
|
iwconfig_configure()
|
||||||
{
|
{
|
||||||
local x= APS=
|
local x= APS=-1
|
||||||
eval SSID=\$ssid_${IFVAR}
|
eval SSID=\$ssid_${IFVAR}
|
||||||
|
|
||||||
# Support old variable
|
# Support old variable
|
||||||
|
Loading…
Reference in New Issue
Block a user