| View previous topic :: View next topic |
| Author |
Message |
cazort Apprentice


Joined: 19 Sep 2004 Posts: 280 Location: Lancaster, PA
|
Posted: Tue Jun 10, 2008 6:01 pm Post subject: Boot hangs on DHCP when ethernet cable not connected[SOLVED] |
|
|
I have a laptop, which, like many people, I like to connect to ethernet when it's available, and fall back on wireless support when it's not. I have the ethernet set to DHCP because I use it at different locations.
When I boot and am not connected to an ethernet connection, it sees the ethernet and hangs for quite some time, waiting for DHCP.
The computer seems to have the capability to detect instantly whether or not a cable is plugged in for which a device is attached to it. How can I have it utilize this information on boot so that it only tries to do DHCP if a cable is actually plugged in and attached to another device? It seems a senseless waste of time, and it puzzles me that the default behaviour is for it to wait to do DHCP even when nothing is attached.
I'd like to not only solve this for myself personally, but contribute some of my time and energy to Gentoo to get the default behaviour improved. Any ideas? _________________ Gentoo is cool, and by cool, I mean totally sweet!
Last edited by cazort on Thu Jun 12, 2008 11:18 am; edited 1 time in total |
|
| Back to top |
|
 |
yabbadabbadont Veteran


Joined: 13 Mar 2003 Posts: 4739
|
Posted: Tue Jun 10, 2008 6:30 pm Post subject: |
|
|
From /etc/conf.d/net.example:
| Quote: | # For passing custom options to dhcpcd use something like the following. This
# example reduces the timeout for retrieving an address from 60 seconds (the
# default) to 10 seconds.
#dhcpcd_eth0="-t 10"
|
If you can find how to get it to detect a connected cable, that would be better though. |
|
| Back to top |
|
 |
cyrillic Veteran


Joined: 18 Feb 2003 Posts: 7086 Location: Groton, Massachusetts USA
|
Posted: Tue Jun 10, 2008 9:42 pm Post subject: Re: Boot hangs on DHCP when ethernet cable not connected |
|
|
| cazort wrote: | | The computer seems to have the capability to detect instantly whether or not a cable is plugged in for which a device is attached to it. How can I have it utilize this information on boot so that it only tries to do DHCP if a cable is actually plugged in and attached to another device? |
The Gentoo networking scripts already support this.
| Code: | # emerge ifplugd
# /etc/init.d/net.eth0 restart |
|
|
| Back to top |
|
 |
cazort Apprentice


Joined: 19 Sep 2004 Posts: 280 Location: Lancaster, PA
|
Posted: Tue Jun 10, 2008 9:58 pm Post subject: |
|
|
If I understand it correctly, ifplugd is a daemon. I don't want any daemon running, I just want it to make the correct decision at startup when it sets up the interface. If I emerge ifplugd, will this fix the problem of loading at boot, without actually loading the daemon? _________________ Gentoo is cool, and by cool, I mean totally sweet! |
|
| Back to top |
|
 |
yabbadabbadont Veteran


Joined: 13 Mar 2003 Posts: 4739
|
Posted: Tue Jun 10, 2008 10:24 pm Post subject: |
|
|
| Doesn't look like it. But it is a very small daemon, about 25KB or so. |
|
| Back to top |
|
 |
cyrillic Veteran


Joined: 18 Feb 2003 Posts: 7086 Location: Groton, Massachusetts USA
|
Posted: Wed Jun 11, 2008 10:01 am Post subject: |
|
|
| cazort wrote: | | If I understand it correctly, ifplugd is a daemon. I don't want any daemon running ... |
Your DHCP client is a daemon too ...
I personally use ifplugd because I love the convenience of being able to plug and unplug the cable whenever I want, and the networking scripts just do the right thing. |
|
| Back to top |
|
 |
cazort Apprentice


Joined: 19 Sep 2004 Posts: 280 Location: Lancaster, PA
|
Posted: Thu Jun 12, 2008 11:18 am Post subject: |
|
|
Thanks! This worked! _________________ Gentoo is cool, and by cool, I mean totally sweet! |
|
| Back to top |
|
 |
|