For some time now I've a usb wireless stick in my normal pc in stead of a wired connection to my router. I had all the time this annoyance that net.wlan0 refused to get associated with my wireless network (and therefore refused to get an ip address as well, obviously). It always needed a manual restart of net.wlan0. My configuration is rather straight forward: === /etc/conf.d/net === dns_domain_lo="broeksemaatjes.nl" modules=( "wpa_supplicant" ) wpa_supplicant_wlan0="-Dwext" modules_wlan0="dhcpcd" === === /etc/wpa_supplicant/wpa_supplicant.conf === # De onderstaande regel mag niet aangepast ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel ap_scan=0 network={ ssid="MyESSID" proto=WPA key_mgmt=WPA-PSK pairwise=CCMP TKIP psk="some_pass_phrase" } === And in /etc/conf.d/rc I disable net.eth0 hotpluging Suddenly I realized that I compiled wpa_supplicant with the dbus use flag enabled and therefore that it might be true that net should depend on dbus. So a I did a quick test: === /etc/init.d/net.wlan0 === ... depend() { # need localmount # Old line, doesn't work need localmount dbus # Add dbus for wpa_supplicant ... === With this modification it works. That is, now my wireless adapter associates with my network and gets an ip address assigned on startup without manual intervention. I realize that this is a brute for workaround which shouldn't be this way in portage, but at least I hope it gives some clue on how to fix this problem. I think I've seen this problem more in the fora (though I'm too lazy to provide you with links). Cheers, Bertjan Reproducible: Always Steps to Reproduce: 1. Make sure net doesn't depend on dbus 2. add net.wlan0 (using wpa_supplicant with dbus flag) to default runlevel 3. (re)boot your system Actual Results: net.wlan0 doesn't get associated with the configured wireless network. Only when restarting net.wlan0 after boot it works correctly. Expected Results: net.wlan0 gets associated with the wireless network at boot time without further manual intervention. I'm not completely sure if this is related to baselyout but: this was reproduced with sys-apps/baselayout-1.12.14-r1
i use wpa_supplicant without dbus all the time, so adding the line explicitly all the time isnt going to work
(In reply to comment #1) > i use wpa_supplicant without dbus all the time, so adding the line explicitly > all the time isnt going to work > I explicitly checked this. Without the dbus dependency in net.wlan0, net.wlan0 (can) start before dbus. And for me, if that happens, it will not work. Only when wlan0 starts after dbus it works as expected.
and again, dbus is irrelevant if wpa_supplicant isnt using it. it might be required in *your* setup, but that doesnt mean it is required all the time. you're also forgetting that net.wlan0 is a symlink to a net.lo script which works for all interfaces, so adding any specific info to the global script is wrong. a clean solution is necessary.
(In reply to comment #3) > and again, dbus is irrelevant if wpa_supplicant isnt using it. it might be > required in *your* setup, but that doesnt mean it is required all the time. > you're also forgetting that net.wlan0 is a symlink to a net.lo script which > works for all interfaces, so adding any specific info to the global script is > wrong. a clean solution is necessary. > If you had read my first comment you would have encountered this: "I realize that this is a brute force workaround which shouldn't be this way in portage, but at least I hope it gives some clue on how to fix this problem. I think I've seen this problem more in the fora (though I'm too lazy to provide you with links)." I *am* fully aware that the workaround I describe is very specific to my setup and no I did not forget that net.wlan0 is a symlink to net.lo. Nevertheless, a solution needs to be created that solves this particular problem by starting net.* after dbus *if* that is needed. The main goal of this bug report was to provide a detailed description of a problem and its cause, not to come up with a clean solution. The workaround provided was just to illustrate that it indeed solves the described problem. Now, I'm not a Gentoo developer, just a user. I know to quite some extend how to use Gentoo. However, to come up with a clean(er) solution I'd need more pointers than just the remark that the current proposal isn't clean. That is, I'm willing to spend some time on investigating for a cleaner solution if someone can give me some pointers about the rough outline how such a solution should look like.
Fix pushed in commit f8f03bd, please test. Specifically, if the wpa_supplicant help lists DBus, we add in 'need dbus' to the dependencies for that interface.
(In reply to comment #5) > Fix pushed in commit f8f03bd, please test. > Specifically, if the wpa_supplicant help lists DBus, we add in 'need dbus' to > the dependencies for that interface. Cool, committed does mean I should get it with the next emerge --sync? Could you post the patch here otherwise?
(In reply to comment #6) > Cool, committed does mean I should get it with the next emerge --sync? Could > you post the patch here otherwise? I want to fix one more bug, then I'll release 0.6.8, and the fix will be included in 0.6.8.