I have one wireless machine that sits in a low signal strength position in our home. The machine had been running FC2 and ndiswrapper. With FC2 if the network didn't come up at boot time then the FC2 scripts would continue trying to attach to the network and within a few minutes the machine would have connectivity. Once connected the machine would stay connected fine, but if it dropped off the network would reattach itself soon afterward. We have recently (1 week ago) converted the machine to Gentoo. The machien works well except for the boot time /etc/init.d/net.wlan0 script. Apparently this script tries only once to connect. If it attaches, then fine, but if not it doesn't try again. The machine boots and then no user can get access to the network. As a byproduct of not attaching the init scripts never bring up sshd, samba, mythbackend and possibly one or two other things. Running the script requires root access and enough training to know what scripts to run. Can the scripts be improved to make the machine continue to try to attach so that over time a user would see the machine working correctly? Additionally, can the scripts that depend on network access be improved so that once the wireless network attaches I do not have to go to the machine personally to get sshd running? Reproducible: Always Steps to Reproduce: 1. Boot with router turned off 2. Turn on router 3. connection never happens Actual Results: The machien stays disconnected forever. Expected Results: I would like it to attach when the router is back up or signal strength is better. dragonfly ~ # emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.11 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 16 2005, 03:24:16)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/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="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apache2 audiofile avi berkdb bitmap-fonts caps cdr crypt cups curl dvd dvdr dvdread emboss encode esd fam firebird flac fluidsynth foomaticdb fortran gd gdbm gif gimp gimpprint gnome gpm gstreamer gtk gtk2 i8x0 imlib ipv6 jack jack-tmpfs java jpeg kde ladcca ladspa libg++ libwww lirc mad mikmod mjpeg mmx motif mozcalendar mozilla mp3 mpeg mysql mythtv ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline samba sdl sndfile spell sse sse2 ssl svga tcltk tcpd threads tiff transcode truetype truetype-fonts type1-fonts usb v4l v4l2 vorbis xml2 xmms xscreensaver xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY dragonfly ~ #
Does sys-apps/ifplugd work with WiFi? It should, according to the documentation...
I had a quick look at the home page. As for the wireless part it seems like it might help. I am not sure how it addresses something like sshd not being started at boot time and needing to be started after the wireless link is established. This will take a few days to look at in more detail. The mailing list for this app is very low volume. I'll sign up and ask some questions there if it looks encouraging.
sshd should start even without your wireless link if you set RC_NET_STRICT_CHECKING="no" (needs ~arch baselayout to work correctly, IIRC).
Sorry for my newbieness. In what conf file to I find RC_NET_STRICT_CHECKING? I think I have the ~x86 version of baselayout: dragonfly ~ # ACCEPT_KEYWORDS="~x86" emerge -pv baselayout These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-apps/baselayout-1.11.11-r1 -bootstrap -build -debug -static (-uclibc) 0 kB Total size of downloads: 0 kB dragonfly ~ #
/etc/conf.d/rc
Already set that way: RC_NET_STRICT_CHECKING="no"
Possibly you meant RC_NET_STRICT_CHECKING="none"? # RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service. # The following values are allowed: # none - The 'net' service is always considered up. # no - This basically means that at least one net.* service besides net.lo # must be up. This can be used by notebook users that have a wifi and # a static nic, and only wants one up at any given time to have the # 'net' service seen as up. I do not enable the wired interface because I don't use it. Could I enable net.eth0 but somehow get the routes set up correctly even if wlan0 isn't up yet?
>Possibly you meant >RC_NET_STRICT_CHECKING="none"? Sure, sorry...
OK - I'll try that on next reboot.
Don't know why this got assigned to mobile@...
is your /etc/init.d/net.wlan0 a sep file or is it a symlink to /etc/init.d/net.lo ?
Actually I was surprised to see that it is neither: dragonfly init.d # ls -la net* lrwxrwxrwx 1 root root 6 Apr 21 16:43 net.eth0 -> net.lo -rwxr-xr-x 1 root root 24246 Apr 21 16:43 net.lo lrwxrwxrwx 1 root root 20 Apr 18 07:38 net.wlan0 -> /etc/init.d/net.eth0 -rwxr-xr-x 1 root root 2873 Apr 21 16:43 netmount dragonfly init.d # What woyuld the suggested setup be for a systme that will boot to wireless and is not enabling net.eth0 at all? The issue here was that the 2005.0 universal install didn't do anything about net.wlan0 so I asked some questions on the user list and this was the suggestion. Thanks!
what you've shown is fine ... as long as net.wlan0 *eventually* resolves to net.lo in baselayout-1.11.x, you're ok wrt that :)
OK, I've found a small downtime in MythTV usage, change RC_NET_STRICT_CHECKING="none" and done a reboot. 1) Indeed net.wlan0 did not start at boot time, as usual. 2) A few things that weren't starting before are starting now - sshd - nfs 3) I gave the machine a few minutes to let net.wlan0 come up on it's own. It did not. 4) As root I issued /etc/init.d/net.wlan0 start about 5-6 times. net.wlan0 finally started. 5) I tried ssh -l mark dragonfly and was able to connect so it appears that once net.wlan0 was up that sshd was working correctly. That's where I am not. I have connectivity which is great, but it doesn't appear that this change in strict checking has done anything to allow net.wlan0 to come up after boot time. This still appears to require that I log in as root and start net.wlan0 by hand. Worse, I ran into another issue. The reasonto convert this machine from FC2 to Gentoo was to bring it up as a MythTV backend which I didn't want to do under FC2. Much happier on Gentoo doing that stuff. However either MythTV, MySQL or both are requiring network for them to be started at boot time and since wlan0 wasn't up they didn't start, so it appears the strict checking option is only allowing other netoworking apps/daemons to start and isn't allowing mysql/mythbackend to start. This would be a total hack but could I start net.eth0 on some bogus address but still automatically set the routing tables to be wlan0 if and when it eventually comes up? That won't fix me having to start wlan0 by hand but at least it would allow MythTV to start up correctly when the machine is booted. And the real question is what's needed to get the scripts to attempt to bring up wlan0 later? Should it be a cron job? There's some package I was looking at called sys-process/daemontools that has some sort of process monitoring capabilities and can supposedly be configured to reastart daemons when they die or don't start. I tried but my newbieness seemed to have beaten me out. Thanks
You could try this: In /etc/conf.d/wireless set the option sleep_associate_eth0="600" Which gives the interface up to 10 minutes to try to find a connection. For some reason, there is no "infinity" option which would allow it to keep trying forever.
associate_timeout_eth1=0 Now enables an infinite timeout for wpa_supplicant and iwconfig. The old variables (wpa_timeout_eth1 and sleep_associate_eth1 are still supported). That is now in our svn repo and will be in baselayout-1.12.0_pre4 As to the restarting issue, ifplugd may work with your wireless. wpa_supplicant - if it supports your hardware - will do exactly what you need when you use wpa_supplicant-0.4.x and baselayout-1.12.0_pre3-r2 or better.
pre9 is out, and should fix the issue. Re-open if you disagree