View previous topic :: View next topic |
Author |
Message |
klausel n00b
Joined: 23 May 2006 Posts: 3
|
Posted: Tue May 23, 2006 5:06 pm Post subject: dhcp to background |
|
|
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 |
|
|
thepustule Apprentice
Joined: 22 Feb 2004 Posts: 212 Location: Toronto, Canada
|
Posted: Tue May 23, 2006 5:21 pm Post subject: |
|
|
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 |
|
|
troymc Guru
Joined: 22 Mar 2006 Posts: 553
|
Posted: Tue May 23, 2006 5:24 pm Post subject: |
|
|
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 |
|
|
thepustule Apprentice
Joined: 22 Feb 2004 Posts: 212 Location: Toronto, Canada
|
Posted: Tue May 23, 2006 6:10 pm Post subject: |
|
|
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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
themusicalguy n00b
Joined: 27 Jun 2006 Posts: 10 Location: UK
|
Posted: Sun Sep 24, 2006 12:17 pm Post subject: |
|
|
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 |
|
|
lramos85 Tux's lil' helper
Joined: 29 Jun 2004 Posts: 141 Location: Riverside, Ca
|
Posted: Mon Feb 12, 2007 7:42 pm Post subject: |
|
|
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:
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 |
|
|
cgits n00b
Joined: 15 Jul 2005 Posts: 71 Location: Europe
|
Posted: Mon Feb 26, 2007 1:44 am Post subject: |
|
|
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:
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 |
|
|
|