sys-apps/openrc-0.3.0-r1 with net-wireless/wpa_supplicant-0.6.4 This version of wpa_supplicant introduces a new way to configure the options ctrl_interface and ctrl_interface_group in wpa_supplicant.conf. /lib/rc/net/wpa_supplicant.sh does not parse this correctly, resulting in non-working wireless. Old way of configuring ctrl_interface in wpa_supplicant.conf: ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel New way of configuring ctrl_interface: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel The error is in line 108 in /lib/rc/net/wpa_supplicant.sh, but I don't know what sed-magic is required to parse this correctly. Reproducible: Always Steps to Reproduce: 1. include the line ctrl_interface=DIR=/var/run/wpa_supplicant in wpa_supplicant.conf 2. start a net.wlan-service dependent on wpa_supplicant 3. never get connection Actual Results: No wlan-connection Expected Results: A working wpa_supplicant-initiated wlan connection.
The correct steps of reproduction: Steps to Reproduce: 1. Include the line: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel in wpa_supplicant.conf 2. Start a net.wlan-service dependent on wpa_supplicant 3. Never get a connection
Something like this should work: sed -n -e 's/[[:space:]]*#.*//g;s/[[:space:]]*$//g;s/^ctrl_interface=DIR=\(.*\)[[:space:]]\+GROUP=.*/\1/p'
(In reply to comment #2) > Something like this should work: > > sed -n -e > 's/[[:space:]]*#.*//g;s/[[:space:]]*$//g;s/^ctrl_interface=DIR=\(.*\)[[:space:]]\+GROUP=.*/\1/p' > Heh, this is not backwards compatible though :(
The following solution is much better and it's compatible with <net-wireless/wpa_supplicant-0.6. It is supposed to replace the whole current expression, not just the last piece. sed -n -e '/^ctrl_interface=/{ s/^ctrl_interface=\([^[:space:]]*\).*/\1/ s/^DIR=// p }' Note: the newline before the last parenthesis is mandatory for BSD sed. On GNU platforms you could just write the entire expression on one line, separating commands with semicolons.
I'm struggling to get this to work with NetBSD sed right now.
This is klunky, but works sed -e '/^ctrl_interface=/!d' \ -e 's/^ctrl_interface=//' \ -e 's/^ *//' \ -e 's/^DIR=//' \ -e 's/^ *//' \ -e 's/GROUP=.*//' \ /etc/wpa_supplicant.conf Comments?
I guess this was fixed in OpenRC 0.4.1 http://roy.marples.name/projects/openrc/changeset/1452
Looks like you're right. I haven't gotten around to marking each ticket with the version fixed. Thanks for doing that here.