Bug 520269

Summary: wpa_supplicant and network service synchronization won't support static wireless network configurations
Product: [Fedora] Fedora Reporter: Randy Yates <yates>
Component: wpa_supplicantAssignee: Dan Williams <dcbw>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dcbw, pb, yates
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-29 17:23:30 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
wpa_supplicant init script
working wpa_supplicant.conf file
working /etc/sysconfig/network-scripts/ifcfg-wlan0 script
new airlink service none

Description Randy Yates 2009-08-29 20:05:56 EDT
Some networking scenarios make the use of a static wireless network
configuration more desirable than one based on interactive Network
Manager configuration. For example, systems which always connect to
the same wireless AP in the same way have no need of a GUI for
interactively connecting, and in fact the presence of such a GUI would
be distracting.

Additionally, there are scenarios which require that the network
interface be available on boot prior to login, e.g., an unattended
machine that is controlled by a UPS. A networking configuration based
on Network manager is only available after user login.

Thus a wireless network configuration that is not based on Network
Manager is desirable in these scenarios.

One such configuration utilizes the "network" and "wpa_supplicant"
services along with a suitable wpa_supplicant.conf file and
/etc/sysconfig/network-scripts/ifcfg-wlan0 script. Services would then
be configured as follows

  /sbin/chkconfig wpa_supplicant on
  /sbin/chkconfig network on
  /sbin/chkconfig NetworkManager off

Such a configuration will require the wpa_supplicant service
to be started prior to the network service at bootup. 


Further, attempting to modify the service priority of the 
/etc/rc.d/init.d/wpa_supplicant by changing the header

# chkconfig:   - 23 88


# chkconfig:   345 9 88

doesn't work because of the $local_fs and messagebus dependencies
further down in the header (see the attached wpa_supplicant 
script) - the wpa_supplicant service continues to start AFTER
the network service. 

Even further yet, removing the $local_fs and messagebus dependencies
results in an unbootable system.

Thus the purpose of this ticket is to request that the init service
priorities for the network, wpa_supplicant, local_fs, messagebus, and
potentially other related services to be "rewired" so that a default
installation will start the wpa_supplicant service prior to the
network service.

Version-Release number of selected component (if applicable):

Name       : wpa_supplicant
Arch       : x86_64
Epoch      : 1
Version    : 0.6.8
Release    : 4.fc11
Size       : 618 k
Repo       : installed
From repo  : updates
Summary    : WPA/WPA2/IEEE 802.1X Supplicant
URL        : http://w1.fi/wpa_supplicant/
License    : BSD
Description: wpa_supplicant is a WPA Supplicant for Linux, BSD and Windows with support
           : for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA
           : component that is used in the client stations. It implements key negotiation
           : with a WPA Authenticator and it controls the roaming and IEEE 802.11
           : authentication/association of the wlan driver.

Additional info:

Linux localhost.localdomain #1 SMP Mon Aug 24 17:17:40 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Randy Yates 2009-08-29 20:09:58 EDT
Created attachment 359176 [details]
wpa_supplicant init script
Comment 2 Randy Yates 2009-08-29 20:11:30 EDT
Created attachment 359177 [details]
working wpa_supplicant.conf file
Comment 3 Randy Yates 2009-08-29 20:12:02 EDT
Created attachment 359178 [details]
working /etc/sysconfig/network-scripts/ifcfg-wlan0 script
Comment 4 Randy Yates 2009-08-31 11:26:15 EDT
I got around this issue by turnning the network service off and then created my own service that does nothing but start and stop the network service. I established the service with a priority and run-level that ensure it starts after the wpa_supplicant service. See attached init serice script "airlink".
Comment 5 Randy Yates 2009-08-31 11:30:02 EDT
Created attachment 359284 [details]
new airlink service
Comment 6 Peter Bieringer 2009-11-26 08:56:21 EST
See also https://bugzilla.redhat.com/show_bug.cgi?id=154348
Still happen on F12

BTW: a small patch will solve this issue:

--- ifup-wireless	2008-02-17 13:18:59.000000000 +0100
+++ ifup-wireless	2007-06-10 15:16:07.000000000 +0200
@@ -108,3 +100,7 @@
     # use any essid
     iwconfig $DEVICE essid any >/dev/null 2>&1
+if [ "$WPA" = "yes" -a ! -f /var/lock/subsys/wpa_supplicant ] ; then
+    service wpa_supplicant start

it need only to add a line


Comment 7 Dan Williams 2009-11-29 17:23:30 EST
there's more comments about how initscripts should be integrated with wpa_supplicant in this thread.  That basically means using the ifcfg-wlan0 to construct a wpa_supplicant config file so that we can preserve the normal, well-known mechanisms that Fedora/Red Hat admins know for network configuration in /etc/sysconfig/network-scripts, and the normal ifup/ifdown commands.

*** This bug has been marked as a duplicate of bug 154348 ***