Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Any way to Run dhcpcd client in background during boot up ?
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
dhvani001
n00b
n00b


Joined: 09 May 2013
Posts: 2

PostPosted: Thu May 09, 2013 11:08 am    Post subject: Any way to Run dhcpcd client in background during boot up ? Reply with quote

Hi,

I new to gentoo linux. I need a help to regarding dhcpcd client. I want to run dhcpcd client in background during boot up process as right now what happen is that i am connecting my gentoo linux machine in switch. in switch i have also connected server but right now its is power off. I turn on my gentoo machine and what i see is that genoot is waiting forever untill it get ip from dhcp server. So i want to run dhcpcd client in background in boot up.

Please suggest me how can i run dhcpcd client in background ?

Can any one help me on this ?

Thanks in advanced,

-Regards
Dhvani Patel
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 295

PostPosted: Thu May 09, 2013 11:31 am    Post subject: Reply with quote

Set up a static IP with dhcpcd for a quick fix. For me it went down from ~8s to 1.849s
Back to top
View user's profile Send private message
dhvani001
n00b
n00b


Joined: 09 May 2013
Posts: 2

PostPosted: Thu May 09, 2013 11:51 am    Post subject: Reply with quote

rorgoroth wrote:
Set up a static IP with dhcpcd for a quick fix. For me it went down from ~8s to 1.849s



Hi

But how can i fix this ? I have to provide ip from dhcp server not a static ip ?
Please can you provide me some step ?
Is there any option to run any process in background during boot up ?

My issue is just put dhcpcd client to run in background ?

What happen in my case is that my dhcp server is turn off and i am turning my gentoo machine after some time dhcp server is start .

so my gentoo machine wait untill its get ip address from dhcp server ?
If i am able to put a dhcpcd client to put in background then my issue may be resolved ?

Can you provide me some step How to put dhcpcd client into background process during bootup ?

-Best Regards
Dhvani Patel
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 295

PostPosted: Thu May 09, 2013 12:04 pm    Post subject: Reply with quote

Well, you could use the parallel feature of OprenRC but it is kinda... non-working. It may work to some small degree, but I have no idea if it would make dhcpcd start earlier so other things will progress or if there is a way to force it to start dhcpcd earlier, even if you managed to get start earlier in the background it will still take forever though.


Edit: VV I think this may be just incredibly bad reading skills on my part :?


Last edited by GFCCAE6xF on Thu May 09, 2013 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Thu May 09, 2013 12:05 pm    Post subject: Reply with quote

I think you are looking for:

Code:
rc-update add dhcpcd default


I have gotten to the point it is so rare that I have to statically assign an ip that if I do I just do it via ifconfig on the console. I dont even have net.eth* symlinks in /etc/init.d anymore.
Back to top
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Sun May 12, 2013 6:15 pm    Post subject: Reply with quote

Why not enable dhcpcd but with a small timeout? I use a 5-second timeout.

Code:

$ cat /etc/conf.d/net
config_eth0="dhcp"
dhcpcd_eth0="-t 5"

_________________
Please add "[solved]" to the initial topic title when it is solved.
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Sun May 12, 2013 7:35 pm    Post subject: Reply with quote

Sven Vermeulen wrote:
Why not enable dhcpcd but with a small timeout? I use a 5-second timeout.

Code:

$ cat /etc/conf.d/net
config_eth0="dhcp"
dhcpcd_eth0="-t 5"


That way probably works good for most. Some buggy network drivers like the tg3 hang forever because they don't report link mode accurately and adding dhcpcd to the default runlevel is a better solution.
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