Description of problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts wpa_supplicant
init scipt start should return 0 when wpa%suplicant is already running.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. service NetworkManager stop && service wpa_supplicant stop
2. service wpa_supplicant start
3. service wpa_supplicant start; echo $?
ret code 1
ret code 0
Created attachment 369229 [details]
adding "-P /var/run/wpa_supplicant.pid" to wpa_supplicant arguments
The code "1" is returned because daemon() function of init scripts
just checks running instance by means of a pid file presence. As it doesn't exist the function continues and fails later.
So the patch adds the pid parameter to
wpa_supplicant.sysconfig, that is used by initscripts.
The parameter is also added to
wpa_supplicant-0.5.10-dbus-service-file.patch in order NetworkManager invoked wpa_supplicant used it as well.
The problem still remains in this scenario:
1. service NetworkManager start
2. service wpa_supplicant stop
3. service wpa_supplicant start
The step 3) returns "1", because there is a race in step 2).
Step 2) stops wpa_supplicant, but it is immediately restarted by NetworkManager. However init script continues and removes the pid file of the new wpa_supplicant instance.
That's why wpa_supplicant is running before step 3), but the pid file doesn't exist.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.
More information and reason for this action is here:
Shouldn't the initscripts check if the pid in the pidfile they are about to remove is actually in-use by the correct program? If it's about to remove the file but the pid in that file refers to a running instance of the program, it probably shouldn't remove the pidfile.
In any case, doing a new build with the patch, thanks Jirka!
wpa_supplicant-0.6.8-6.fc11 has been submitted as an update for Fedora 11.
wpa_supplicant-0.6.8-7.fc12 has been submitted as an update for Fedora 12.
wpa_supplicant-0.6.8-6.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update wpa_supplicant'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12346
wpa_supplicant-0.6.8-7.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
wpa_supplicant-0.6.8-6.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.