diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-13 18:27:53 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-13 18:27:53 +0200 |
commit | 80121affa055e21e967ed84eccd157483a7570ff (patch) | |
tree | db9ad1bf9ad5fff33563550f6333254f62af27f2 | |
parent | 0b6ac7bf41ef2f1cf548eda8a4054c21a4bd9434 (diff) | |
download | netctl-80121affa055e21e967ed84eccd157483a7570ff.tar.gz netctl-80121affa055e21e967ed84eccd157483a7570ff.tar.xz |
ethernet: set wpa_supplicant control path if needed (FS#25473)
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | src/connections/ethernet | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index f9c660c..dba693b 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -37,7 +37,12 @@ ethernet_up() { . "$SUBR_DIR/8021x" [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" [[ -z "$WPA_DRIVER" ]] && WPA_DRIVER="wired" - + # Set wpa_supplicant control path (FS#25473) + WPA_CTRL_PATH=/var/run/wpa_supplicant + if grep "^ *ctrl_interface=" "$WPA_CONF" &>/dev/null; then + WPA_CTRL_PATH=$(grep -m 1 "^ *ctrl_interface=" "$WPA_CONF" | tail -n 1 | cut -d= -f 2- | sed -r 's/DIR=(.*) +GROUP=.*/\1/') + fi + report_debug ethernet_iproute_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" |