that is a stupid idea and conflicts with ifplugd. ifplugd takes the interface up, so it can get the link status. now if ifplugd notices a new link, it starts the action script which starts net.eth0 start which should start dhcpcd. but it does not, as the net.eth0 script sees the interface up and decides not to start dhcpcd. that is a bad heuristic that is not working in this case. If you are worried about starting dhcpcd twice, then it might be better to check the pid file of dhcpcd or simply try to kill it (dhcpcd eth0 -k). Reproducible: Always Steps to Reproduce: 1. configure dhcp on eth0 2. emerge ifplugd 3. start ifplugd, disable automatic start of net.eth0. shutdown dhcpcd if there is one on eth0, disconnect the network cable. 4. wait 20 seconds 5. insert the network cable. the syslog will show that ifplug.action was started, which will start /etc/init.d/net.eth0 Actual Results: no dhcpcd on eth0 Expected Results: dhcpcd should run on eth0
Relates to #44013
This is #44013 :-)
I'ld like to propose the following solution to the problem which works just fine for me (saw something similar in a different bug report I'm not able to find any more): init.d/net.eth0,v 1.37 before: status_IFACE="$(ifconfig ${1} 2>${devnull} | gawk '$1 == "UP" {print "up"}')" init.d/net.eth0,v 1.37 after: status_IFACE="$(ifconfig ${1} 2>${devnull} | gawk '/addr:/{a=1}/ UP /{ if (a == 1) print "up" }')" With this patch an interface is only considered to be up if ifconfig reports UP and an address. Please note that Bug 34484 reports the very same problem.
I found the bug again I was referencing to. It is Bug 28362 and it is the very same problem.
Bug 34484 has a fix for this.
this has been fixed