View previous topic :: View next topic |
Author |
Message |
erikm l33t
Joined: 08 Feb 2005 Posts: 634
|
Posted: Thu Feb 10, 2005 6:26 pm Post subject: Newbie question: Need based dhclient configuration? [SOLVED] |
|
|
Hi all,
as indicated in the title, this may be a dumb question, but I can't seem to find an answer anywhere. I run the latest gentoo on my stationary system and my laptop. I use dhcp to connect to the internet, which works excellently for my stationary can. However, my laptop isn't always connected to the LAN via the ethernet card, and when it isn't, I find it is a bit of a pain to
a) wait for the dhclient script to exit on bootup, and
b) manually restart eth0 if I hook up without rebooting.
My real problem is laziness, of course. So, is there a way to get the dhclient to run on a "need basis"? That is, it starts on bootup if I am connected, and when I do connect otherwise?
Last edited by erikm on Thu Feb 24, 2005 3:53 pm; edited 2 times in total |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Thu Feb 10, 2005 6:32 pm Post subject: Re: Newbie question: Need based dhclient configuration? |
|
|
New unstable baselayout ebuilds solve this. |
|
Back to top |
|
|
erikm l33t
Joined: 08 Feb 2005 Posts: 634
|
Posted: Thu Feb 10, 2005 6:51 pm Post subject: |
|
|
Thanks, care to share which ones and how? |
|
Back to top |
|
|
Matt126 n00b
Joined: 18 Apr 2004 Posts: 16
|
Posted: Thu Feb 10, 2005 7:12 pm Post subject: |
|
|
Code: | rc-update del net.eth0 default |
that will stop eth0 from coming up at startup, that's what I have on my laptop as well because I use a combination of eth0 and wlan0.
edit: i think control + c will stop it from searching for a DHCP server too on boot. maybe i'm wrong though. |
|
Back to top |
|
|
erikm l33t
Joined: 08 Feb 2005 Posts: 634
|
Posted: Thu Feb 10, 2005 7:16 pm Post subject: |
|
|
Matt126 wrote: | Code: | rc-update del net.eth0 default |
that will stop eth0 from coming up at startup, that's what I have on my laptop as well because I use a combination of eth0 and wlan0.
edit: i think control + c will stop it from searching for a DHCP server too on boot. maybe i'm wrong though. |
Well, that much I know. It still means I have to manually initiate the script when I connect, which is part of what I'm trying to avoid. Ctrl+C does not abort dhclient, as far as I know... |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Feb 10, 2005 9:46 pm Post subject: |
|
|
Use ifplugd to manage your wired connections |
|
Back to top |
|
|
mast3rmind n00b
Joined: 05 Aug 2004 Posts: 49
|
Posted: Fri Feb 11, 2005 2:42 am Post subject: |
|
|
I'm in the same boat as ErikM, Is there some way to make the dhcp scripts background after 2 seconds? I noticed that on a suse 9 install at my work it's dhcp script backgrounds after so many seconds, but i have not had the time to view the script is there some way to do somthing similar on gentoo, i viewed the script on my gentoo install and it seems to already run in the background...? |
|
Back to top |
|
|
erikm l33t
Joined: 08 Feb 2005 Posts: 634
|
Posted: Fri Feb 11, 2005 12:18 pm Post subject: |
|
|
UberLord wrote: | Use ifplugd to manage your wired connections |
Thanks a bunch!!! This is exactly what I wanted!!
For others having the same "problem", do
patch /etc/init.d/net.eth0 according to here, set
in /etc/conf.d/ifplugd (the other default settings work fine), then do
Code: | rc-update del net.eth0 default
rc-update add ifplugd boot
/etc/init.d/net.eth0 stop
/etc/init.d/ifplugd start | and, th-th-th-thats all folks!
(Disclaimer: I don't know whether ifplugd is best set as a boot service or not, feel free to correct me on this...) |
|
Back to top |
|
|
|