From 9d9f17aa523f2e5df6067c6a1d6ee9808fb2479f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 23 Dec 2008 10:13:58 +0000 Subject: Allow working with the new ctrl_iface=DIR=foo directive. --- net/wpa_supplicant.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'net') 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 -- cgit v1.2.3