Bug 520269 - wpa_supplicant and network service synchronization won't support static wireless network configurations
Summary: wpa_supplicant and network service synchronization won't support static wirel...
Status: CLOSED DUPLICATE of bug 154348
Alias: None
Product: Fedora
Classification: Fedora
Component: wpa_supplicant
Version: 11
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-08-30 00:05 UTC by Randy Yates
Modified: 2009-11-29 22:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-11-29 22:23:30 UTC

Attachments (Terms of Use)
wpa_supplicant init script (1.82 KB, application/octet-stream)
2009-08-30 00:09 UTC, Randy Yates
no flags Details
working wpa_supplicant.conf file (199 bytes, application/octet-stream)
2009-08-30 00:11 UTC, Randy Yates
no flags Details
working /etc/sysconfig/network-scripts/ifcfg-wlan0 script (345 bytes, application/octet-stream)
2009-08-30 00:12 UTC, Randy Yates
no flags Details
new airlink service (922 bytes, application/octet-stream)
2009-08-31 15:30 UTC, Randy Yates
no flags Details

Description Randy Yates 2009-08-30 00:05:56 UTC
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-30 00:09:58 UTC
Created attachment 359176 [details]
wpa_supplicant init script

Comment 2 Randy Yates 2009-08-30 00:11:30 UTC
Created attachment 359177 [details]
working wpa_supplicant.conf file

Comment 3 Randy Yates 2009-08-30 00:12:02 UTC
Created attachment 359178 [details]
working /etc/sysconfig/network-scripts/ifcfg-wlan0 script

Comment 4 Randy Yates 2009-08-31 15:26:15 UTC
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 15:30:02 UTC
Created attachment 359284 [details]
new airlink service

Comment 6 Peter Bieringer 2009-11-26 13:56:21 UTC
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 22:23:30 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.