Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83349 - net initscript on sys-apps/baselayout-1.11.7-r2 does not bring wlan0 up
Summary: net initscript on sys-apps/baselayout-1.11.7-r2 does not bring wlan0 up
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-25 21:10 UTC by Keith Gable
Modified: 2005-02-28 23:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Init script I am using to configure the interface using net.wlan0 and then bring it up (up,79 bytes, text/plain)
2005-02-25 21:13 UTC, Keith Gable
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Gable 2005-02-25 21:10:14 UTC
If I "rc-update add net.wlan0 default" (with net.wlan0 symlinked to net.lo), my interface is correctly configured (ifconfig shows the right IP and the right subnet mask, and the right ESSID is set), but it is not brought up. I have to ifconfig wlan0 up before I get connectivity.

This error did not happen in earlier versions of the 1.11 baselayout, and I made a workaround initscript that "fixes" the problem.

Also, if the IP address is assigned via DHCP, it works fine. It only seems to mess up when a static IP is used.

I will attach the workaround script I am using that brings the interface up on boot.

Reproducible: Always
Steps to Reproduce:
1. Add net.wlan0 to the default runlevel.
2. Modify /etc/conf.d/net, add config_wlan0 = ("192.168.0.4/24")
3. Reboot
4. ifconfig wlan0
5. iwconfig wlan0

Actual Results:  
The interface is setup properly but is not brought up and therefore I don't get
connectivity.

Expected Results:  
The interface is brought up after it is configured and connectivity happens
after net.wlan0 finishes.

keith keith # emerge info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r5 i686)
=================================================================
System uname: 2.6.10-gentoo-r5 i686 mobile AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 12 2005, 21:29:16)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.4_p6, 1.7.9-r1, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r1, 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -pipe -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.osuosl.org/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/
ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/
ftp://ftp.ussg.iu.edu/pub/linux/gentoo
ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.seren.com/gentoo
http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/
http://cudlug.cudenver.edu/gentoo/
ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/
http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/
http://gentoo.ccccom.com ftp://gentoo.ccccom.com http://mirrors.tds.net/gentoo
ftp://mirrors.tds.net/gentoo http://gentoo.netnitco.net
ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/
http://mirror.tucdemonic.org/gentoo/
http://mirror.clarkson.edu/pub/distributions/gentoo/
http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/
http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/
ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org
http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo
http://gentoo.eliteitminds.com http://www.gigaload.org/gentoo.org/
http://chod.cwru.edu/gentoo ftp://chod.cwru.edu/gentoo
http://gentoo.cs.lewisu.edu/gentoo/ ftp://linux.cs.lewisu.edu/gentoo/
http://prometheus.cs.wmich.edu/gentoo http://modzer0.cs.uaf.edu/public/gentoo/
http://mirror.usu.edu/mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi bash-completion berkdb bitmap-fonts bonobo
cdr crypt cups curl doc eds emboss encode esd f77 flac font-server foomaticdb
fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick
imlib ipv6 java jpeg junit kde ldap libg++ libwww mad mikmod motif mozilla mpeg
mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python qt
quicktime readline samba sdl snmp spell ssl svga tcpd tiff truetype
truetype-fonts type1-fonts xml xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Keith Gable 2005-02-25 21:13:02 UTC
Created attachment 52163 [details]
Init script I am using to configure the interface using net.wlan0 and then bring it up

init script I am using the configure the interface using net.wlan0 and then
bring the interface up
Comment 2 Roy Marples (RETIRED) gentoo-dev 2005-02-28 03:17:46 UTC
baselayout-1.11.9-r1 is the latest version which may fix your issue

Please test and report back
Comment 3 Keith Gable 2005-02-28 16:44:56 UTC
I've got good news, and I've got bad news...


...the good news is that the latest version does bring wlan0 up.
...the bad news is that it adds the route (default via 192.168.0.1 is what routes_wlan0 is set to) for the wrong adapter. I don't get Internet connectivity with these new scripts through my gateway.

I had to revert to 1.11.8 with my botched "up" script, which is sort of working (it's working crappier than 1.11.7 did, but it's working better than 1.11.8 did [my up script didn't fix anything at all]).

I don't mind being an ebuild guinea pig if the need be (hey, anything as long as it works ;) )

Also, for some odd reason, 1.11.8 seems to want to bring famd down with wlan0 when I /etc/init.d/net.wlan0 stop. (new bug, yes, but still should note it)
Comment 4 Keith Gable 2005-02-28 16:46:16 UTC
correction:
"(it's working crappier than 1.11.7 did, but it's working better than 1.11.8 did [my up script didn't fix anything at all])."

should read:

"(it's working crappier than 1.11.7 did, but it's working better than 1.11.9 did [my up script didn't fix anything at all])."

Sorry for the confusion :)
Comment 5 SpanKY gentoo-dev 2005-02-28 16:49:09 UTC
can you post the relevant sections from conf.d/net and perhaps a patch against 1.11.9-r1 ?
Comment 6 Keith Gable 2005-02-28 17:49:29 UTC
keith@keith ~ $ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

config_wlan0=( "192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0" )
# for when eth0 is configured
#config_eth0=( "192.168.0.26 broadcast 192.168.0.255 netmask 255.255.255.0" )
routes_wlan0=( "default via 192.168.0.1" )

And here's what the "right" routing table looks like:
keith keith # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.92.0    *               255.255.255.0   U     0      0        0 vmnet1
192.168.136.0   *               255.255.255.0   U     0      0        0 vmnet8
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         DAD.mshome.net  0.0.0.0         UG    0      0        0 wlan0

The wrong one had a default pointing to 192.168.0.1 on eth0, and eth0 is disconnected, so it would obviously not work.

As for a patch, what do you mean? Try and hack at it (I can try, I'm sort of a programmer [some C, some C++, a lot of VB, lots of DOS batch files, and so on]), or diff init.d/net.lo from 1.11.8 and 1.11.9?
Comment 7 Keith Gable 2005-02-28 18:19:50 UTC
I did a bit of poking around, and it looks like I might have forgotten to ndiswrapper -m (since modprobe wlan0 isn't doing what it's supposed to).

Running now, then rebooting.
Comment 8 Keith Gable 2005-02-28 18:53:32 UTC
And now, it works. I don't know what the problem was; the only thing different was that I did ndiswrapper -m && modules-update...

My routes are getting properly added, and the interface properly configured. Or it is right now. If it happens again (the original problem would only show up after rebooting once -- it'd work the first time an address was used), I'll let you know :P

I'd RESOLVED FIXED it, but I don't want to do anything that you don't want me to do (I did it once on bugzilla.mozilla.org and they didn't like it -_-).
Comment 9 Roy Marples (RETIRED) gentoo-dev 2005-02-28 23:34:24 UTC
Marking as WorksForMe as there's no bug to actually fix