diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-14 16:23:30 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-14 16:23:30 +0200 |
commit | bc76e53fd917a1d991dc48ee3ff93f0ac9a510d1 (patch) | |
tree | 7ae0ef5f4482dd2fe136a7fae91c1755b31aa1e2 | |
parent | f670917e974265c4559be7a62b9b95c07ec954d3 (diff) | |
download | netctl-bc76e53fd917a1d991dc48ee3ff93f0ac9a510d1.tar.gz netctl-bc76e53fd917a1d991dc48ee3ff93f0ac9a510d1.tar.xz |
wireless: also accept leading spaces when parsing control socket path
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | src/connections/wireless | 4 |
1 files changed, 2 insertions, 2 deletions
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) |