From bc76e53fd917a1d991dc48ee3ff93f0ac9a510d1 Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sun, 14 Aug 2011 16:23:30 +0200 Subject: wireless: also accept leading spaces when parsing control socket path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Oudompheng --- src/connections/wireless | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/connections') diff --git a/src/connections/wireless b/src/connections/wireless index a52972a..b19afde 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -30,8 +30,8 @@ wireless_up() { 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 -m 1 "^ctrl_interface=" "$WPA_CONF" | tail -n 1 | cut -d= -f 2- | sed -r 's/DIR=(.*) +GROUP=.*/\1/') + 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 else WPA_CONF=$(make_wpa_config_file $INTERFACE) -- cgit v1.2.3-24-g4f1b