Line 618 if /lib/rcscripts/net.modules.d/iwconfig: if ! ${found_AP}; then I think it has to be if ${found_AP}; then because the following branch sets the association if an access point has been found, not if nothing has been found. Reproducible: Always Steps to Reproduce: Using baselayout-1.11.7-r2
baselayout-1.11.12-r1 is the lastest in ~ARCH - does this issue still exist?
Yes, it's still there. Look at the code: <snip> ewarn "Trying to force preferred in case they are hidden" for essid in "${preferred_aps[@]}"; do local found_AP=false for ((i = 0; i < ${#mac_APs[@]}; i++)); do if [[ ${essid} == ${essid_APs[i]} ]]; then found_AP=true break fi done if ! ${found_AP} ; then ESSID=${essid} iwconfig_associate ${iface} && return 0 fi done </snap> It crawls through array preferred_aps and compares it with every element in array essid_APs. If it finds an equality, it sets found_AP = true and breaks the inner loop. Then, if found_AP = false (!!!), it associates the last compared essid and returns. I can't test right now since I have no hidden wlan around anymore. But up to my understanding, "if found_AP = true" makes more sense here. You can even do without the found_AP variable if you do the association in the inner loop: for ((i = 0; i < ${#mac_APs[@]}; i++)); do if [[ ${essid} == ${essid_APs[i]} ]]; then ESSID=${essid} iwconfig_associate ${iface} && return 0 break fi done
No, because by the time you've reached that bit of code it's already tried to asscociate with AP's in it's preferred list that have been *found* in a scan. So this loop is purely to associate with preferred AP's that were *not found* in the scan. Try setting RC_VERBOSE="yes" in /etc/conf.d/net and then re-running the script. It should say what AP's it's found and the ones it tries to connect to. Also, checkout the associate_order variable in /etc/conf.d/wireless.example which may help you. If this still fails, please post as attachments the full output of starting the init script with the RC_VERBOSE="yes" setting and your /etc/conf.d/net and wireless files.
Closed - Need more information