From a1fc17107a833d0a55bca8b14d3244b7788adf86 Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sat, 30 Jul 2011 20:57:29 +0200 Subject: Use configured control path for wpa_supplicant (FS#24949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the wpa_cli calls may fail if the specified ctrl_interface directory differs from the default one. Signed-off-by: Rémy Oudompheng --- src/connections/wireless | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/connections/wireless') diff --git a/src/connections/wireless b/src/connections/wireless index 7f95c6f..e38a14f 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -26,8 +26,13 @@ wireless_up() { stop_wpa "$INTERFACE" # Start wpa_supplicant + WPA_CTRL_PATH=/run/wpa_supplicant if [ "$SECURITY" = "wpa-config" ]; then WPA_CONF="${WPA_CONF:-/etc/wpa_supplicant.conf}" + # Use defined control path (FS#24949) + if grep "ctrl_interface=" "$WPA_CONF" &>/dev/null; then + WPA_CTRL_PATH=$(grep "ctrl_interface=" "$WPA_CONF" | cut -d= -f 2- | sed -r 's/DIR=(.*) +GROUP=.*/\1/') + fi else WPA_CONF=$(make_wpa_config_file $INTERFACE) fi -- cgit v1.2.3-24-g4f1b