diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-09 00:18:32 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-09 00:18:32 +0200 |
commit | 64224b898eaffbe7ac3f4830bfa940027229c509 (patch) | |
tree | 70dd3fc5a5b608fc162d3d231babc373218fbc56 /src/connections | |
parent | ffb13baf64d2dab72b6d228865f9bfbe6bcfba2c (diff) | |
download | netctl-64224b898eaffbe7ac3f4830bfa940027229c509.tar.gz netctl-64224b898eaffbe7ac3f4830bfa940027229c509.tar.xz |
Fix wrong parsing of wpa_supplicant configuration (FS#25464)
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src/connections')
-rw-r--r-- | src/connections/wireless | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connections/wireless b/src/connections/wireless index e38a14f..7ed5abe 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -31,7 +31,7 @@ wireless_up() { 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/') + 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) |