Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Newbie question: Need based dhclient configuration? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Thu Feb 10, 2005 6:26 pm    Post subject: Newbie question: Need based dhclient configuration? [SOLVED] Reply with quote

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. :wink: 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
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Thu Feb 10, 2005 6:32 pm    Post subject: Re: Newbie question: Need based dhclient configuration? Reply with quote

New unstable baselayout ebuilds solve this. :wink:
Back to top
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Thu Feb 10, 2005 6:51 pm    Post subject: Reply with quote

Thanks, care to share which ones and how?
Back to top
View user's profile Send private message
Matt126
n00b
n00b


Joined: 18 Apr 2004
Posts: 16

PostPosted: Thu Feb 10, 2005 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Thu Feb 10, 2005 7:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Feb 10, 2005 9:46 pm    Post subject: Reply with quote

Use ifplugd to manage your wired connections
Back to top
View user's profile Send private message
mast3rmind
n00b
n00b


Joined: 05 Aug 2004
Posts: 49

PostPosted: Fri Feb 11, 2005 2:42 am    Post subject: Reply with quote

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
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Fri Feb 11, 2005 12:18 pm    Post subject: Reply with quote

UberLord wrote:
Use ifplugd to manage your wired connections


Thanks a bunch!!! This is exactly what I wanted!! :P
For others having the same "problem", do
Code:
emerge ifplugd

patch /etc/init.d/net.eth0 according to here, set
Code:
AUTO="yes"

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum