View previous topic :: View next topic |
Author |
Message |
cazort Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
Posted: Tue Jun 10, 2008 11: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? _________________ Alex Zorach | Teacology | RateTea | Why This Way
Last edited by cazort on Thu Jun 12, 2008 4:18 pm; edited 1 time in total |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Tue Jun 10, 2008 11: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 Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Wed Jun 11, 2008 2:42 am 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 Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
Posted: Wed Jun 11, 2008 2:58 am 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? _________________ Alex Zorach | Teacology | RateTea | Why This Way |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Wed Jun 11, 2008 3:24 am Post subject: |
|
|
Doesn't look like it. But it is a very small daemon, about 25KB or so. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Wed Jun 11, 2008 3:01 pm 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 Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
|
Back to top |
|
|
|