summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-08-14 16:23:30 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-08-14 16:23:30 +0200
commitbc76e53fd917a1d991dc48ee3ff93f0ac9a510d1 (patch)
tree7ae0ef5f4482dd2fe136a7fae91c1755b31aa1e2 /src
parentf670917e974265c4559be7a62b9b95c07ec954d3 (diff)
downloadnetctl-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>
Diffstat (limited to 'src')
-rw-r--r--src/connections/wireless4
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)