aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-05 09:37:38 +0000
committerRoy Marples <roy@marples.name>2009-01-05 09:37:38 +0000
commit0298e4ffa079db7d3685281cd3aff44f2362eadd (patch)
tree4aa20cf96144f9d84f46fd838729e841184afe84
parenta063035b370abed7ed5f44365053bcc6dfb4f318 (diff)
Remove leading and trailing space on the ctrl_interface line.
-rw-r--r--net/wpa_supplicant.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh
index ae7ea788..092dfb36 100644
--- a/net/wpa_supplicant.sh
+++ b/net/wpa_supplicant.sh
@@ -105,12 +105,14 @@ wpa_supplicant_pre_start()
fi
# Work out where the ctrl_interface dir is if it's not specified
- local ctrl_dir=$(sed -e '/^ctrl_interface=/!d' \
+ local ctrl_dir=$(sed -e 's/^ *//' \
+ -e '/^ctrl_interface=/!d' \
-e 's/^ctrl_interface=//' \
-e 's/^ *//' \
-e 's/^DIR=//' \
-e 's/^ *//' \
-e 's/GROUP=.*//' \
+ -e 's/ *$//' \
"${cfgfile}")
if [ -z "${ctrl_dir}" ]; then
ctrl_dir=${opts##* -C}