As a Gentoo laptop user, I find it lightly annoying that when no cable is plugged into my network port, I get to DHCP and have to wait for the timeout during boot. It would be nice, if similar to the way that wireless interfaces detect that there are no access points and therefore doesn't try to run DHCP, the wired portion of /etc/init.d/net.lo would notice the absence of a wire and fail earlier.
Issues I immediately start to wonder about. 1.) Is the RUNNING flag issued by /sbin/ifconfig enough to go on? I just noticed that it goes away if I stop my wired network card. Is there another way to detect if the ethernet cable is plugged in or not from software? Bringing up the card with a static IP and checking? 2.) Does this only effect DHCP or should it effect static IP's too?
(In reply to comment #1) > 1.) Is the RUNNING flag issued by /sbin/ifconfig enough to go on? No. Quite a few drivers don't report link status correctly, so we don't do this by default in baselayout. However, baselayout will use either netplugd or ifplugd by default if installed to bring the interface up/down depending on link status as reported by the kernel driver. Again, some drivers don't work correctly with this. If yours does not, please file a kernel bug. Re-open if you disagree
(In reply to comment #2) > However, baselayout will use either netplugd or ifplugd by default if installed > to bring the interface up/down depending on link status as reported by the > kernel driver. Wait, so if I emerge ifplugd, should the /etc/init.d/net.* scripts work in the way I mentioned above? It will not get to the point where DHCP is called if there is no ethernet cable? Is that what you're saying? I could only find ifplugd in portage, where is netplugd found?
(In reply to comment #3) > Wait, so if I emerge ifplugd, should the /etc/init.d/net.* scripts work in > the way I mentioned above? It will not get to the point where DHCP is called > if there is no ethernet cable? Correct. It will background. When a cable is plugged in it will automatically run DHCP. When the cable is removed the interface will be stopped. > I could only find ifplugd in portage, where is netplugd found? sys-apps/netplug
ifplugd works for me! Thanks!