--- wpa_supplicant 2004-12-08 19:52:00.000000000 +0000 +++ /lib/rcscripts/net.modules.d/wpa_supplicant 2004-12-17 10:10:14.917604273 +0000 @@ -11,7 +11,7 @@ } wpa_cli() { - LC_ALL=C /usr/sbin/wpa_cli "$@" + LC_ALL=C /usr/bin/wpa_cli "$@" } # char* wpa_supplicant_provides(void) @@ -82,12 +82,12 @@ # Note that just because we are associated does not mean we are using the # correct encryption keys wpa_supplicant_associated() { - local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^decision/ { print $2 }' ) ) + local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state/ { print $2 }' ) ) if [[ ${status[0]} == NONE ]]; then [[ ${status[1]} == ASSOCIATED ]] else - [[ ${status[2]} == COND_SUCC ]] + [[ ${status[1]} == COMPLETED ]] fi return $? } @@ -117,6 +117,9 @@ local pid=$( ps --no-headers -fC wpa_supplicant 2>/dev/null | awk '/-i'${iface}'/ { print $2 }' ) [[ -n ${pid} ]] && kill -s TERM ${pid} + # Some drivers require the interface to be up + interface_up ${iface} + if ! wpa_supplicant ${opts} -B -c/etc/wpa_supplicant.conf -i${iface} ; then eend 1 return 1