summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-07-14 13:41:55 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-07-14 13:41:55 +0200
commit0d4c3ce797e688e146768bac07f6162d02634140 (patch)
tree9782c4e50149afd9b6c188e96e857c51f082beea
parent2f11cd187d487253084b37b27740cbd6fd567788 (diff)
downloadnetctl-0d4c3ce797e688e146768bac07f6162d02634140.tar.gz
netctl-0d4c3ce797e688e146768bac07f6162d02634140.tar.xz
Don't rely on wpa_cli reconfigure to reload wpa.conf
It seems to sometimes prevent wpa_supplicant to associate properly.
-rw-r--r--src/connections/wireless15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index 09017e7..7f95c6f 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -54,6 +54,9 @@ wireless_up() {
fi
fi
+ report_debug wireless_up stop_wpa "$INTERFACE"
+ stop_wpa "$INTERFACE"
+
# Manually set iwconfig options (DEPRECATED)
if [[ -n "$IWCONFIG" ]]; then
report_warn "The use of IWCONFIG option is deprecated."
@@ -68,12 +71,6 @@ wireless_up() {
none|wep|wpa|wpa-configsection)
echo -e "network={ \n$(make_wpa_config) \n}" >> "$WPA_CONF"
report_debug wireless_up "Configuration generated at $WPA_CONF"
- report_debug wireless_up wpa_reconfigure "$INTERFACE"
- if ! wpa_reconfigure "$INTERFACE"; then
- report_fail "WPA configuration failed!"
- stop_wpa "$INTERFACE"
- return 1
- fi
;;
*)
report_fail "Invalid SECURITY setting: $SECURITY"
@@ -86,6 +83,12 @@ wireless_up() {
report_debug wireless_up ifup
bring_interface up "$INTERFACE" || return 1
+ report_debug wireless_up start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_DRIVER" "$WPA_OPTS"
+ if ! start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_DRIVER" "$WPA_OPTS"; then
+ report_fail "wpa_supplicant did not start, possible configuration error"
+ return 1
+ fi
+
report_debug wireless_up wpa_check
if ! wpa_check "$INTERFACE" "$TIMEOUT"; then
report_fail "WPA Authentication/Association Failed"