Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 130104 | Differences between
and this patch

Collapse All | Expand All

(-)lib/rcscripts/net.modules.d/wpa_supplicant (-2 / +4 lines)
Lines 99-105 Link Here
99
# Note that just because we are associated does not mean we are using the
99
# Note that just because we are associated does not mean we are using the
100
# correct encryption keys
100
# correct encryption keys
101
wpa_supplicant_associated() {
101
wpa_supplicant_associated() {
102
	local -a status=( "$( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^EAP state/ { print "\""$2"\"" }' )" )
102
	local -a status
103
	eval status=( $( wpa_cli -i"$1" status | awk -F= '/^key_mgmt|^wpa_state|^EAP state/ { print "\""$2"\"" }' ) )
103
104
104
	case ${status[0]} in
105
	case ${status[0]} in
105
		"NONE"	)		[[ ${status[1]} == "ASSOCIATED" || ${status[1]} == "COMPLETED" ]] ;;
106
		"NONE"	)		[[ ${status[1]} == "ASSOCIATED" || ${status[1]} == "COMPLETED" ]] ;;
Lines 214-220 Link Here
214
215
215
	# Set ESSID for essidnet and report
216
	# Set ESSID for essidnet and report
216
	ESSID=$( wpa_supplicant_get_essid ${iface} )
217
	ESSID=$( wpa_supplicant_get_essid ${iface} )
217
	local -a status=( "$( wpa_cli -i${iface} status | awk -F= '/^bssid|^pairwise_cipher|^key_mgmt/ { print "\""$2"\"" }' )" )
218
	local -a status
219
	eval status=( $( wpa_cli -i"${iface}" status | awk -F= '/^bssid|^pairwise_cipher|^key_mgmt/ { print "\""$2"\"" }' ) )
218
	local mac=$( echo ${status[0]} | tr '[:lower:]' '[:upper:]' )
220
	local mac=$( echo ${status[0]} | tr '[:lower:]' '[:upper:]' )
219
	einfo "${iface} connected to \"${ESSID//\\\\/\\\\}\" at ${mac}"
221
	einfo "${iface} connected to \"${ESSID//\\\\/\\\\}\" at ${mac}"
220
222

Return to bug 130104