Lines 11-17
Link Here
|
11 |
} |
11 |
} |
12 |
|
12 |
|
13 |
wpa_cli() { |
13 |
wpa_cli() { |
14 |
LC_ALL=C /usr/sbin/wpa_cli "$@" |
14 |
LC_ALL=C /usr/bin/wpa_cli "$@" |
15 |
} |
15 |
} |
16 |
|
16 |
|
17 |
# char* wpa_supplicant_provides(void) |
17 |
# char* wpa_supplicant_provides(void) |
Lines 82-93
Link Here
|
82 |
# Note that just because we are associated does not mean we are using the |
82 |
# Note that just because we are associated does not mean we are using the |
83 |
# correct encryption keys |
83 |
# correct encryption keys |
84 |
wpa_supplicant_associated() { |
84 |
wpa_supplicant_associated() { |
85 |
local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^decision/ { print $2 }' ) ) |
85 |
local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state/ { print $2 }' ) ) |
86 |
|
86 |
|
87 |
if [[ ${status[0]} == NONE ]]; then |
87 |
if [[ ${status[0]} == NONE ]]; then |
88 |
[[ ${status[1]} == ASSOCIATED ]] |
88 |
[[ ${status[1]} == ASSOCIATED ]] |
89 |
else |
89 |
else |
90 |
[[ ${status[2]} == COND_SUCC ]] |
90 |
[[ ${status[1]} == COMPLETED ]] |
91 |
fi |
91 |
fi |
92 |
return $? |
92 |
return $? |
93 |
} |
93 |
} |
Lines 117-122
Link Here
|
117 |
local pid=$( ps --no-headers -fC wpa_supplicant 2>/dev/null | awk '/-i'${iface}'/ { print $2 }' ) |
117 |
local pid=$( ps --no-headers -fC wpa_supplicant 2>/dev/null | awk '/-i'${iface}'/ { print $2 }' ) |
118 |
[[ -n ${pid} ]] && kill -s TERM ${pid} |
118 |
[[ -n ${pid} ]] && kill -s TERM ${pid} |
119 |
|
119 |
|
|
|
120 |
# Some drivers require the interface to be up |
121 |
interface_up ${iface} |
122 |
|
120 |
if ! wpa_supplicant ${opts} -B -c/etc/wpa_supplicant.conf -i${iface} ; then |
123 |
if ! wpa_supplicant ${opts} -B -c/etc/wpa_supplicant.conf -i${iface} ; then |
121 |
eend 1 |
124 |
eend 1 |
122 |
return 1 |
125 |
return 1 |