commit:     986cf37b69299d2aa9d4eb678a2798b0bc021bc0
Author:     Henning Schild <henning <AT> hennsch <DOT> de>
AuthorDate: Fri Nov 24 13:02:58 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Nov 27 20:22:06 2017 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=986cf37b

net/wpa_supplicant: change how we match wired connections

Before that patch you needed to write "-Dwired" in /etc/conf.d/net.
Where in fact "-D wired" or even a string with multiple spaces would be
ok for wpa_supplicant.

Signed-off-by: Henning Schild <henning <AT> hennsch.de>
Closes: https://github.com/gentoo/netifrc/pull/27
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
(cherry picked from commit f5b82067ee5ce9badf328c92723e36a86588e74d)

 net/wpa_supplicant.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh
index c487238..5df662a 100644
--- a/net/wpa_supplicant.sh
+++ b/net/wpa_supplicant.sh
@@ -63,10 +63,11 @@ wpa_supplicant_pre_start()
        eval opts=\$wpa_supplicant_${IFVAR}
        eval cliopts=\$wpa_cli_${IFVAR}
        [ -z "${cliopts}" ] && cliopts=${wpa_cli}
-       case " ${opts} " in
-               *" -Dwired "*) wireless=false;;
-               *) _is_wireless || return 0;;
-       esac
+       if echo " $opts " | grep -q " \-D[[:space:]]wired "; then
+               wireless=false
+       else
+               _is_wireless || return 0
+       fi
 
        # We don't configure wireless if we're being called from
        # the background unless we're not currently running

Reply via email to