Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

dhcp to background

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
klausel
n00b
n00b
Posts: 3
Joined: Tue May 23, 2006 4:47 pm

dhcp to background

  • Quote

Post by klausel » Tue May 23, 2006 5:06 pm

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
Top
thepustule
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Feb 22, 2004 1:01 pm
Location: Toronto, Canada

  • Quote

Post by thepustule » Tue May 23, 2006 5:21 pm

I recommend looking at the ifplugd app.

If your machine regularly starts without a network cable, this program will deal with it nicely.
Top
troymc
Guru
Guru
Posts: 553
Joined: Wed Mar 22, 2006 8:48 am

  • Quote

Post by troymc » Tue May 23, 2006 5:24 pm

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: Select all

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
Top
thepustule
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Feb 22, 2004 1:01 pm
Location: Toronto, Canada

  • Quote

Post by thepustule » Tue May 23, 2006 6:10 pm

To use ifplugd, you remove the net.eth0 script from your default runlevel

Code: Select all

rc-update del net.eth0 default
And then you install ifplugd
emerge ifplugd

rc-update add ifplugd default
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Tue May 23, 2006 7:35 pm

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
Top
themusicalguy
n00b
n00b
User avatar
Posts: 10
Joined: Tue Jun 27, 2006 8:01 pm
Location: UK
Contact:
Contact themusicalguy
Website

  • Quote

Post by themusicalguy » Sun Sep 24, 2006 12:17 pm

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
Top
lramos85
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 141
Joined: Tue Jun 29, 2004 10:58 pm
Location: Riverside, Ca

  • Quote

Post by lramos85 » Mon Feb 12, 2007 7:42 pm

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: Select all

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: Select all

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!
Top
cgits
n00b
n00b
Posts: 71
Joined: Fri Jul 15, 2005 10:04 am
Location: Europe

  • Quote

Post by cgits » Mon Feb 26, 2007 1:44 am

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: Select all

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: Select all

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?
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic