diff options
author | Jim Pryor <profjim@jimpryor.net> | 2009-08-11 14:04:54 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-08-15 04:28:26 +0200 |
commit | a2a257c1d87dc384b224dd8f024b7dc7661e161c (patch) | |
tree | dfe0e9ecf70e8f73c35f101a15486401ceaae970 /src/connections/ethernet-iproute | |
parent | 0d3ccc0c91b944f318a6d0648d96fd7f99405f22 (diff) | |
download | netctl-a2a257c1d87dc384b224dd8f024b7dc7661e161c.tar.gz netctl-a2a257c1d87dc384b224dd8f024b7dc7661e161c.tar.xz |
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 <profjim@jimpryor.net>
Diffstat (limited to 'src/connections/ethernet-iproute')
-rw-r--r-- | src/connections/ethernet-iproute | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/connections/ethernet-iproute b/src/connections/ethernet-iproute index 2f0c485..6264497 100644 --- a/src/connections/ethernet-iproute +++ b/src/connections/ethernet-iproute @@ -31,13 +31,15 @@ ethernet_up() { [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" [[ -z "$WPA_OPTS" ]] && WPA_OPTS="-Dwired" - if ! start_wpa $INTERFACE $WPA_CONF $WPA_OPTS; then + report_debug ethernet_iproute_up start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_OPTS" + 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 ip link set $INTERFACE down + report_fail "WPA Authentication/Association Failed" return 1 fi fi |