If an instance of wpa_supplicant was terminated uncleanly, for example due to a system crash, the wpa_supplicant helper script in baselayout-1.11.8 is unable to restart the service. Wpa_supplicant will complain about a leftover directory, which is by default /var/run/wpa_supplicant/. The attached patch will query the user's /etc/wpa_supplicant.conf file for the ctrl_interface variable and remove the matching directory if it still exists. Reproducible: Always Steps to Reproduce: 1. Start a net script that uses the wpa_supplicant module. 2. SIGKILL wpa_supplicant. 3. Restart the net script.
Created attachment 46549 [details, diff] Patches /lib/rcscripts/net.modules.d/wpa_supplicant. Patches /lib/rcscripts/net.modules.d/wpa_supplicant.
Perhaps adding a patch for wpa_supplicant which allows removing the ctrl interface directory before attempting to bind the socket (via command line option) would be a better solution in the long run. I'll look into this.
Fixed in CVS - will be in baselayout-1.11.9
ctrl_iface directory should only be removed in case the system is restarted. There may be more than one wpa_supplicant process using the same directory. In general, the ctrl_iface file is blocking two wpa_supplicant processed for the same interface and this functionality should be maintained since it can avoid some very odd looking results if more than one process is controlling the same interface.. I changed wpa_supplicant to test whether the existing socket accepts connections and if it does not, to replace it with a new one. This allows wpa_supplicant to recover from forced termination (e.g., SIGKILL or crash) and as such, make the attached patch unnecessary. This change is now in CVS and will be included in the next 0.3.x release.
That's good :) The patch above is not what made it into our wpa_supplicant helper - first we kill any wpa_supplicant process running on the interface and then we clear the stale socket. So this shouldn't matter .... Anyway, I'll remove the patch when the oldest wpa_supplicant ebuild in portage has your new functionality.
Fixed by baselayout-1.11.9