From 80121affa055e21e967ed84eccd157483a7570ff Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sat, 13 Aug 2011 18:27:53 +0200 Subject: ethernet: set wpa_supplicant control path if needed (FS#25473) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Oudompheng --- src/connections/ethernet | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/connections/ethernet') 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" -- cgit v1.2.3-24-g4f1b