Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 78367
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +9 lines)
Line  Link Here
0
-- wpa_supplicant
0
++ wpa_supplicant
Lines 81-93 Link Here
81
# Note that just because we are associated does not mean we are using the
81
# Note that just because we are associated does not mean we are using the
82
# correct encryption keys
82
# correct encryption keys
83
wpa_supplicant_associated() {
83
wpa_supplicant_associated() {
84
	local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state/ { print $2 }' ) )
84
	local -a status=( "$( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^EAP state/ { print "\""$2"\"" }' )" )
85
86
	case ${status[0]} in
87
		"NONE"	)		[[ ${status[1]} == "ASSOCIATED" ]] ;;
88
		"IEEE 802.1X (no WPA)")	[[ ${status[2]} == "SUCCESS" ]] ;;
89
		*)			[[ ${status[1]} == "COMPLETED" ]] ;;
90
	esac
85
91
86
	if [[ ${status[0]} == NONE ]]; then
87
		[[ ${status[1]} == ASSOCIATED ]]
88
	else
89
		[[ ${status[1]} == COMPLETED ]]
90
	fi
91
	return $?
92
	return $?
92
}
93
}
93
94
Lines 188-194 Link Here
188
189
189
	# Set ESSID for essidnet and report
190
	# Set ESSID for essidnet and report
190
	ESSID=$( wpa_supplicant_get_essid ${iface} )
191
	ESSID=$( wpa_supplicant_get_essid ${iface} )
191
	local -a status=( "$( wpa_cli -i${iface} status | awk -F= '/^bssid|^pairwise_cipher|^key_mgmt/ { print $2 }' )" )
192
	local -a status=( "$( wpa_cli -i${iface} status | awk -F= '/^bssid|^pairwise_cipher|^key_mgmt/ { print "\""$2"\"" }' )" )
192
	local mac=$( echo ${status[0]} | tr '[:lower:]' '[:upper:]' )
193
	local mac=$( echo ${status[0]} | tr '[:lower:]' '[:upper:]' )
193
	einfo "${iface} connected to \"${ESSID//\\\\/\\\\}\" at ${mac}"
194
	einfo "${iface} connected to \"${ESSID//\\\\/\\\\}\" at ${mac}"
194
195

Return to bug 78367