aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-12-23 10:13:58 +0000
committerRoy Marples <roy@marples.name>2008-12-23 10:13:58 +0000
commit9d9f17aa523f2e5df6067c6a1d6ee9808fb2479f (patch)
treed3b1026d60abbd2e420e867ae23bf3c08a42ddf0 /net
parent803dbbf0c808cf8d24b44bf3e944175366ff92a6 (diff)
Allow working with the new ctrl_iface=DIR=foo directive.
Diffstat (limited to 'net')
-rw-r--r--net/wpa_supplicant.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh
index 543f251a..54e13e8d 100644
--- a/net/wpa_supplicant.sh
+++ b/net/wpa_supplicant.sh
@@ -105,7 +105,13 @@ wpa_supplicant_pre_start()
fi
# Work out where the ctrl_interface dir is if it's not specified
- local ctrl_dir=$(sed -n -e 's/[[:space:]]*#.*//g;s/[[:space:]]*$//g;s/^ctrl_interface=//p' "${cfgfile}")
+ local ctrl_dir=$(sed -e '/^ctrl_interface=/!d' \
+ -e 's/^ctrl_interface=//' \
+ -e 's/^ *//' \
+ -e 's/^DIR=//' \
+ -e 's/^ *//' \
+ -e 's/GROUP=.*//' \
+ "${cfgfile}")
if [ -z "${ctrl_dir}" ]; then
ctrl_dir=${opts##* -C}
if [ -n "${ctrl_dir}" -a "${ctrl_dir}" != "${opts}" ]; then