it looks like beginning from 0.6.1 version wpa_supplicant really waits for control interface monitor when -W option is specified on command line and does not respond to status requestes from wpa_cli. unfortunately -W option is hardcoded in the script even though it should be only used when actfiles are used - see below /lib/rcscripts/net/wpa_supplicant.sh line 311 [[ -n ${actfile} ]] && opts="${opts} -W" eval start-stop-daemon --start --exec /sbin/wpa_supplicant \ --pidfile "/var/run/wpa_supplicant-${iface}.pid" \ -- "${opts}" -W -B -i"${iface}" \ -P"/var/run/wpa_supplicant-${iface}.pid" eend "$?" || return 1 # Starting wpa_supplication-0.4.0, we can get wpa_cli to # start/stop our scripts from wpa_supplicant messages if [[ -n ${actfile} ]] ; then mark_service_inactive "net.${iface}" ebegin "Starting wpa_cli on ${iface}" start-stop-daemon --start --exec /bin/wpa_cli \ --pidfile "/var/run/wpa_cli-${iface}.pid" \ -- -a"${actfile}" -p"${ctrl_dir}" -i"${iface}" \ -P"/var/run/wpa_cli-${iface}.pid" -B eend "$?" || return 1 fi -W option is meant to be used when the script means to open an instance of wpa_cli for monitoring the wpa_supplicant, but there is another unnecessary -W option hardcoded in invocation of wpa_supplicant.
You may want to try openrc from http://roy.marples.name/openrc he was the baselayout maintainer until he quit gentoo, this is the continuation of his baselayout-2 package with some cross platform abstractions, works fine for me. A quick check of his code indicates that he hasn't hard coded this option anymore.
Options -w and -W are different. -w is for waiting for interface to be on. And it is good idea to use it by default. I suspect that hardcoded -W has been initially supposed to be -w.
The current stable script doesn't work. If we replace the hardcoded "-W" with "-w". Can we get that out ASAP, otherwise it just doesn't work.
Created attachment 175763 [details] Initscript proof-of-concept / work-around.
Created attachment 175765 [details] Action script proof-of-concept / work-around Corresponds to Initscript. As noted, this wpa action script serves a different purpose than the one in the Gentoo scripts (it starts/stops dhcp, instead of performing cleanup), but that doesn't matter. The "proof of concept" here is that wpa_supplicant *can* be called with the -W option and an action script. Those two scripts work on my system and are currently serving as a work-around.
Comment on attachment 175763 [details] Initscript proof-of-concept / work-around. The problem seems to be that the wpa action script is being called before the control interface is established. When I write my own initscript and action script, this doesn't happen. I use the action script for a different purpose (to start/stop dhcp), but that shouldn't matter. This should at least serve as a proof-of-concept that the applications are performing as they should and the problem lies within the scripts. And it may also help somebody else as a temporary work-around (it's all hard-coded, so be careful).
Oh, and I *am* using openrc, so that's not the solution. (To subscribers, sorry for the multiple messages all at once on this.)
What is the latest on this bug? Thanks, William
No response from user for 1 month since update requested, and more than 2 years before that. Please reopen if it's still broken.