Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 336082

Summary: sys-apps/baselayout-1.12.13 doesn't start wpa_supplicant
Product: Gentoo Linux Reporter: Matthias Herrmann <matthias.mh.herrmann>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED OBSOLETE    
Severity: major CC: esigra, jeremy.william.murphy, openhs
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Matthias Herrmann 2010-09-05 12:50:37 UTC
When I run /etc/init.d/net.wlan0 start I get the following output:
* Service net.wlan0 starting
 * Starting wlan0
 *   Loading networking modules for wlan0
 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4
 *       wpa_supplicant provides wireless
 *       ifconfig provides interface
 *       dhcpcd provides dhcp
 *   Configuring wlan0 for MAC address 00:27:19:B2:1B:45 ...                                                                                                                                               [ ok ]
 *   wpa_supplicant only works on wireless interfaces
 *   unless the -D wired option is specified
 *   Bringing up wlan0
 *     dhcp
 *       Running dhcpcd ...
wlan0: dhcpcd 4.0.15 starting
wlan0: waiting for carrier
wlan0: timed out                                                                                                                                                                                           [ !! ]
 *     Trying fallback configuration
 *     dhcp
 *       Running dhcpcd ...
wlan0: dhcpcd 4.0.15 starting
wlan0: waiting for carrier
wlan0: timed out                                                                                                                                                                                           [ !! ]
 * ERROR:  net.wlan0 failed to start

dhcpcd is timing out because the script doesn't start wpa_supplicant. I checked whether there is a wpa_supplicant process while dhcpcd was running (via ps aux | grep wpa_supplicant and via wpa_cli status).

When I run wpa_supplicant manually my iface connects to my access point as it should. After this running dhcpcd wlan0 gets a lease and my iface wlan0 is successfully connected. What's going on? 

Reproducible: Always

Steps to Reproduce:
1. Run /etc/init.d/net.wlan0
2. dhcpcd is timing out
3.

Actual Results:  
wpa_supplicant is not started by /etc/init.d/net.wlan0

Expected Results:  
wpa_supplicant should be started by /etc/init.d/net.wlan0 so dhcpcd can fetch an IP address

Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r4-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-1.12.13
Timestamp of tree: Fri, 03 Sep 2010 18:45:03 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=amdfam10 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=amdfam10 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 apm bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt css cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fontconfig fortran ftp gdbm gdu gif gnome gnome-keyring gphoto2 gpm gstreamer gtk hal hddtemp iconv icq jpeg lcms ldap libnotify lm_sensors mad matroska mikmod mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib nautilus ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 xcb xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="devinput" RUBY_TARGETS="ruby18" SANE_BACKENDS="hplip" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Matthias Herrmann 2010-09-05 12:55:13 UTC
/etc/conf.d/net:

modules=( "ifconfig" "dhcpcd" )
modules_wlan0=("wpa_supplicant")

wpa_supplicant_wlan0="-Dwext"
config_eth0=("172.22.5.100/16")
routes_eth0=( "default via 172.22.0.1" )
dns_servers_eth0="172.22.0.1 194.25.2.129 194.25.2.130 194.25.2.131 94.25.2.132 194.25.2.133 194.25.2.134"
config_wlan0=("dhcp")
fallback_wlan0=("dhcp")

/etc/wpa_supplicant/wpa_supplicant.conf is not needed here because when I ran it manually it successfully connects to AP..

When you need more information please ask. Thx in advance
Comment 2 Róbert Čerňanský 2010-09-09 13:28:57 UTC
Exactly same behaviour here.  Workaround: baselayout's wpa_supplicant module needs CONFIG_WIRELESS_EXT_SYSFS kernel option to be turned on otherwise function wpa_supplicant_exists() does no pass and wpa_supplicant is not started.

As wpa_supplicant itself works fine even without mentioned kernel option it should be fixed (or at least documented).
Comment 3 Dirk-Lüder Kreie 2010-09-30 12:50:51 UTC
/lib/rcscripts/net/wpa_supplicant.sh should check for phy80211 instead of, or in addition to, wiphy
(line 50)
Comment 4 Dirk-Lüder Kreie 2010-09-30 13:09:21 UTC
Apparently this will not be fixed in baselayout:
See bug #307191

If you want wireless to work while your kernel recompiles with the DEPRECATED option CONFIG_WIRELESS_EXT_SYSFS, just patch /lib/rcscripts/net/wpa_supplicant.sh line 50 to say:
[[ -L /sys/class/net/$1/phy80211 || -d /sys/class/net/$1/wireless ]]

(phy80211 instead of wiphy)
Comment 5 Jeremy Murphy 2011-02-20 00:42:00 UTC
Matthias, could you please test the solutions suggested in comments #2-4 and if they work, close this bug as a duplicate of #307191.  Thanks.
Comment 6 Richard Gration 2011-03-07 22:15:21 UTC
I can confirm that the fix detailed in #4 works.
Comment 7 SpanKY gentoo-dev 2011-09-15 04:43:33 UTC
openrc is stable now