From a2a257c1d87dc384b224dd8f024b7dc7661e161c Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Tue, 11 Aug 2009 08:04:54 -0400 Subject: wpa_cli, start/stop_wpa, wpa_check tweaks * Supply -i switch to wpa_cli * Have wpa_check call stop_wpa on failure, instead of duplicating (only some of) the termination code. * Need brief sleep in termination code. * Note that functions which call wpa_check don't need to call stop_wpa themselves, when wpa_check fails. * Functions which call wpa_check and start_wpa are however responsible for all error reporting on failure. * Add some debugging calls to announce calls to wpa_start/wpa_check Signed-off-by: Jim Pryor --- src/connections/ethernet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/connections/ethernet') diff --git a/src/connections/ethernet b/src/connections/ethernet index 86d8b96..0e72ad3 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -24,12 +24,13 @@ ethernet_up() { [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" [[ -z "$WPA_OPTS" ]] && WPA_OPTS="-Dwired" report_debug ethernet_up start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_OPTS" - if ! start_wpa $INTERFACE $WPA_CONF $WPA_OPTS; then + if ! start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_OPTS"; then report_fail "wpa_supplicant did not start, possible configuration error" return 1 fi if ! wpa_check "$INTERFACE"; then ifconfig "$INTERFACE" down + report_fail "WPA Authentication/Association Failed" return 1 fi fi -- cgit v1.2.3-24-g4f1b