I just ran into this issue during poor WLAN conditions.. I have set up my "fn-f5" shortcut key to start up or shut down net.wlan and turn on radio, basically as such, with wlan_change_state.sh in acpi actions. I'm using wpa_supplicant: #!/bin/sh if iwconfig wlan | grep "radio off" > /dev/null ; then echo 0 > /sys/class/net/wlan/device/rf_kill sleep 2 /etc/init.d/net.wlan start > /dev/null & else /etc/init.d/net.wlan stop > /dev/null & sleep 2 echo 1 > /sys/class/net/wlan/device/rf_kill fi Now, here's a problem I ran into at shaky WLAN connection: I got associated, but the signal was so weak that no actual traffic went through. Problem is that dhcpcd is started up but since it does not obtain IP address, stopping the interface does not work. When attempting to do it directly on the command line, I get # ps ax | grep dhcp 14534 ? S 0:00 /sbin/dhcpcd -t 0 -p -N -Y -m 2000 wlan 28096 pts/0 S+ 0:00 grep --colour=auto dhcp # /etc/init.d/net.wlan stop * Stopping wlan * /etc/conf.d/wireless is deprecated * Please put all settings in /etc/conf.d/net * /etc/conf.d/wireless is deprecated * Please put all settings in /etc/conf.d/net * Running predown function [ ok ] * Bringing down wlan * Stopping dhcpcd on wlan ... Error, wlan: dhcpcd not running [ !! ] /var/run/dhcpcd-wlan.pid is of zero length. Of course, this is because dhcpcd only daemonizes after it has obtained an IP address. Not sure if this is something that should be fixed with baselayout or dhcpcd - or somewhere else.
What baselayout and dhcpcd versions?
Could you try a new dhcpcd version please? http://dev.gentoo.org/~uberlord/dhcpcd-3.1.7_pre2.tar.bz2 To install do this cd /tmp wget http://dev.gentoo.org/~uberlord/dhcpcd-3.1.7_pre2.tar.bz2 tar xvjpf dhcpcd-3.1.7_pre2.tar.bz2 cd dhcpcd-3.1.7_pre2 make install dhcpcd /sbin
Baselayout is 1.12.9-r2 and dhcpcd is 3.1.5-r1. I'll try the new version, thanks.
The new dhcpcd apparently fixes this issue - the PIDfile appears immediately, before daemonizing, so net.xxxx knows which process to kill.
3.1.7 is out