Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp to background
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
klausel
n00b
n00b


Joined: 23 May 2006
Posts: 3

PostPosted: Tue May 23, 2006 5:06 pm    Post subject: dhcp to background Reply with quote

Hi folx,

how can I achieve to start dhcp (/etc/init.d/net.eth0) in background so that the system doesn't hang some minutes when booting without a network connection?


take care

klausel
Back to top
View user's profile Send private message
thepustule
Apprentice
Apprentice


Joined: 22 Feb 2004
Posts: 212
Location: Toronto, Canada

PostPosted: Tue May 23, 2006 5:21 pm    Post subject: Reply with quote

I recommend looking at the ifplugd app.

If your machine regularly starts without a network cable, this program will deal with it nicely.
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Tue May 23, 2006 5:24 pm    Post subject: Reply with quote

I don't know how to do exactly what you are asking, but I have a couple of options.

Lower the timeout in /etc/conf.d/net:

Code:

dhcpcd_eth0="-t 10"


This sets the timeout to 10 seconds.

EDIT: hmm....I wonder if you can put a & at the end of those options to put it in the background.

I've also found that you can ^C and interrupt the dhcp.

Good luck!


troymc
Back to top
View user's profile Send private message
thepustule
Apprentice
Apprentice


Joined: 22 Feb 2004
Posts: 212
Location: Toronto, Canada

PostPosted: Tue May 23, 2006 6:10 pm    Post subject: Reply with quote

To use ifplugd, you remove the net.eth0 script from your default runlevel
Code:
rc-update del net.eth0 default


And then you install ifplugd
Quote:
emerge ifplugd

rc-update add ifplugd default
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue May 23, 2006 7:35 pm    Post subject: Reply with quote

With baselayout-1.12 net.eth0 will launch ifplugd automatically if installed :)

So the reverse of what you said is true ....
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
themusicalguy
n00b
n00b


Joined: 27 Jun 2006
Posts: 10
Location: UK

PostPosted: Sun Sep 24, 2006 12:17 pm    Post subject: Reply with quote

Hey guys.

Hope you don't mind me butting in but is ifplugd ment to run dhcpcd automatically when it detects a network conection and brings up eth0?

I installed ifplud and it controls my eth0 fine (does the backgrounding at boot and brings the interface up) but it wont run dhcpcd.

Any help?
_________________
Innovation: The art of finding answers to questions that have not yet been asked. --Nick Ogden
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Mon Feb 12, 2007 7:42 pm    Post subject: Reply with quote

themusicalguy wrote:
Hey guys.

Hope you don't mind me butting in but is ifplugd ment to run dhcpcd automatically when it detects a network conection and brings up eth0?

I installed ifplud and it controls my eth0 fine (does the backgrounding at boot and brings the interface up) but it wont run dhcpcd.

Any help?


I'm having the same problem. When ifplugd starts at boot it detects the network connection and brings up eth0, when I do ifconfig it even gives an IP address but it is useless to connect.

I had to manually do this to get a working IP address:

Code:

rm /var/run/dhcpcd-eth0.pid
ifconfig eth0 down
ifconfig eth0 up
dhcpcd eth0


The IP Address is exactly the same but it works now.

I hated doing this so I modified the /etc/ifplugd/ifplugd.actions file by adding:

Code:

dhcpd eth0


Now I just have to make sure that I connect the Cable after it boot up, or disconnect and connect it back. Why is this happening?
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
cgits
n00b
n00b


Joined: 15 Jul 2005
Posts: 71
Location: Europe

PostPosted: Mon Feb 26, 2007 1:44 am    Post subject: Reply with quote

lramos85 wrote:
themusicalguy wrote:
Hey guys.

Hope you don't mind me butting in but is ifplugd ment to run dhcpcd automatically when it detects a network conection and brings up eth0?

I installed ifplud and it controls my eth0 fine (does the backgrounding at boot and brings the interface up) but it wont run dhcpcd.

Any help?


I'm having the same problem. When ifplugd starts at boot it detects the network connection and brings up eth0, when I do ifconfig it even gives an IP address but it is useless to connect.

I had to manually do this to get a working IP address:

Code:

rm /var/run/dhcpcd-eth0.pid
ifconfig eth0 down
ifconfig eth0 up
dhcpcd eth0


The IP Address is exactly the same but it works now.

I hated doing this so I modified the /etc/ifplugd/ifplugd.actions file by adding:

Code:

dhcpd eth0


Now I just have to make sure that I connect the Cable after it boot up, or disconnect and connect it back. Why is this happening?


I have the same problem. Where exactly do you add this "dhcpcd eth0" to the /etc/ifplugd/ifplugd.actions file?
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