retitle 396137 /etc/rcS.d/S50hwclock.sh kills roaming mode thanks Kel Modderman wrote: > On Tuesday 31 October 2006 08:57, Michael Biebl wrote: >> The problem only occurs if I have "auto wlan0" in /e/n/i so the >> interface is brought up in /etc/rcS.d/S40networking. >> wpasupplicant/wpa_cli are started, but somehow wpa_cli status always >> shows "DISCONNECTED" and never enters the "SCANNING" state, only after >> kicking it manually. >> >> If I remove "auto wlan0" from /e/n/i and ifup wlan0 manually after >> logging in (or alternatively add "ifup wlan0 in /etc/rc.local), it works >> flawlessly. Kinda strange, I admit. Any ideas? > > Just for kicks, you could insert something like `wpa_cli status > /tmp/file' > at the end of the init_wpa_cli function of /etc/wpa_supplicant/functions.sh > to get an idea of what the wpa_state was immediately after wpa_cli was > launched. If if stuck in DISCONNECTED state, maybe there is some hack to be > made, or if it is in fact scanning, it would suggest something interfered > later in boot, I suppose. >
Hi Kel, as the above hint did not reveal anything interesting, I began to research, why putting ifup in /etc/rc.local worked, but starting the interfaces in /etc/rcS.d/S40networking did not. So I started to move /etc/rcS.d/S40networking to /etc/rcS.d/S99networking, and it worked. So I reduced the start number bit by bit. The last number, where it worked, was S51. Moving it to S49 caused the association to fail. It is hwclock.sh, which kills the scanning. Removing S50hwclock.sh and moving networking back to S40networking also works. My timezone is GMT+1, and I have UTC=no in /etc/default/rcS (because I also run other OSes). So, when S40networking starts ifup wlan0, the time is e.g. 17.00. As the scanning and association takes some time with my ipw2100+wpa, hwclock runs before I get a successful connections and sets the time back to 16.00; this causes the scanning to stop. This explains, why it works, if I use the Managed Mode (it blocks until I have a working connection, and hwclock is run afterwards) or I put ifup wlan0 in /etc/rc.local (it is run after hwclock). So, this is some kind of race condition here. If the assocation has not successfully established before hwclock is started, the scanning is killed by resetting the system time. Hope, the above explanations help you to reproduce the problem. I'm still unsure, what the correct solution for this problem is. Maybe S50hwclock.sh should be run before S40networking. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature