Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Don't start dhcp at bootup
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
Manu311
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2010
Posts: 128

PostPosted: Fri Jun 03, 2011 4:56 pm    Post subject: [SOLVED] Don't start dhcp at bootup Reply with quote

Hi,

I've set up my laptop with gentoo, installed everything needed and I want to configure my network with wicd, wicd depends on dhcpcd, so I had to install that.
But now everytime I start my system, it initiates dhcpcd (which isn't in any runlevel). This also happens when I (re)start sshd. When I unemerge dhcpcd everything is working as I want it - no error nothing.
But I'll need a dhcp client in the future, so that's no alternativ (it will be reinstalled everytime I emerge update anyways).

So I've been searching for days now where this is configured to do so.
The only clue so far was /etc/conf.d/net which was entirely empty but the comments in it tells me that will cause it to run dhcp on any device, so I changed added: eth0_config=( "null" ) - which didn'T worked, I changed the null to an ip, which still didn't work.

I'm sure there must be a hint somewhere, but I just can't find it.

Thanks for any help.


Last edited by Manu311 on Fri Jun 03, 2011 7:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Fri Jun 03, 2011 5:49 pm    Post subject: Reply with quote

If you're not married to Wicd, try NetworkManager. Search for "gentoo networkmanager howto" and you'll find all the info you need on getting a nice connection manager up and running.

I used to like Wicd, but lately it seems that NetworkManager just works better and doesn't have the "problems" Wicd sometimes has.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Jun 03, 2011 5:51 pm    Post subject: Reply with quote

Whether the OP is using wicd or networkmanager has nothing to do with dhcpcd starting. I think it has to do with the init script but can't check right now
Back to top
View user's profile Send private message
Manu311
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2010
Posts: 128

PostPosted: Fri Jun 03, 2011 5:53 pm    Post subject: Reply with quote

And what if I'm engaged with wicd? :P

Anyways it's not gonna help, I'll still need a dhcp client and it looks like networkmanager also depends on dhcpcd, so it's the same thing.
The problem appears also if I don't start wicd or even remove it entirely.
wicd itself works as expected (so far).
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Fri Jun 03, 2011 5:57 pm    Post subject: Re: Don't start dhcp at bootup Reply with quote

Manu311 wrote:
Hi,

I've set up my laptop with gentoo, installed everything needed and I want to configure my network with wicd, wicd depends on dhcpcd, so I had to install that.
But now everytime I start my system, it initiates dhcpcd (which isn't in any runlevel). This also happens when I (re)start sshd. When I unemerge dhcpcd everything is working as I want it - no error nothing.
But I'll need a dhcp client in the future, so that's no alternativ (it will be reinstalled everytime I emerge update anyways).

So I've been searching for days now where this is configured to do so.
The only clue so far was /etc/conf.d/net which was entirely empty but the comments in it tells me that will cause it to run dhcp on any device, so I changed added: eth0_config=( "null" ) - which didn'T worked, I changed the null to an ip, which still didn't work.

I'm sure there must be a hint somewhere, but I just can't find it.

Thanks for any help.



I believe that if the interface requires dhcp (empty config in /etc/conf.d/net will do for that), the dhcpcd will be run when interface is brought up. So you should be looking into different question - how not to bring up interfaces on boot.
For example, by using ifplugd, or not having network /etc/init.d/net.... in the boot sequence and lauching them later separtely. I don't know how wicd works though
Back to top
View user's profile Send private message
Manu311
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2010
Posts: 128

PostPosted: Fri Jun 03, 2011 6:08 pm    Post subject: Re: Don't start dhcp at bootup Reply with quote

dmpogo wrote:
how not to bring up interfaces on boot.
For example, by using ifplugd, or not having network /etc/init.d/net.... in the boot sequence and lauching them later separtely. I don't know how wicd works though

There is no /etc/init.d/net.... file which is in any runlevel
Anyways it's not just at boot, it also starts anytime I start sshd.
If I /etc/init.d/dhcpcd stop that will also stop sshd, and if I restart sshd that will start dhcpcd again - the only way, I found so far, is to remove dhcpcd entirely, and I don't want to do that (since neither networkmanager nor wicd work and ofc dhcp doesn't no matter how I try it).

Oh and my wired connection will most likely never need dhcp, and my wireless not often (currently I haven't installed wireless at all), so it doesn't NEED dhcp, so why should I waste my resources on dhcp when I simply don't need it? I'm not at windows after all.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Fri Jun 03, 2011 6:44 pm    Post subject: Reply with quote

1) I mean /etc/init.d/net.eth0 or /etc/init.d/wlan0

you don't have those ?

2) Are you saying you have dhcpcd in the default/boot runlevel ?

You should not, do rc-update del dhcpcd default

3) sshd requires 'net' . 'net' can be provided by many packages, dhcpcd provides net, net.eth0 provides net.
If you stop the last service that provides net, it has to take down sshd as well.

4) how is your wired connection configured ?
Back to top
View user's profile Send private message
Manu311
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2010
Posts: 128

PostPosted: Fri Jun 03, 2011 7:24 pm    Post subject: Reply with quote

dmpogo wrote:
1) I mean /etc/init.d/net.eth0 or /etc/init.d/wlan0

you don't have those ?

2) Are you saying you have dhcpcd in the default/boot runlevel ?

You should not, do rc-update del dhcpcd default

3) sshd requires 'net' . 'net' can be provided by many packages, dhcpcd provides net, net.eth0 provides net.
If you stop the last service that provides net, it has to take down sshd as well.

4) how is your wired connection configured ?


Thanks a lot, I still have no clue what exactly "net" is, but after I readded net.eth0 to a runlevel dhcpcd stopped beeing autostarted.
That fixed it, thank you.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Fri Jun 03, 2011 7:58 pm    Post subject: Reply with quote

Manu311 wrote:

Thanks a lot, I still have no clue what exactly "net" is, but after I readded net.eth0 to a runlevel dhcpcd stopped beeing autostarted.
That fixed it, thank you.



gentoo init scripts have a system of dependencies between scripts which are set by using 'need something' 'use something' 'provide something' directives.
Look inside /etc/init.d/sshd and see that it has 'need net' statement.

That means that sshd can start only after some other service which has 'provide net' started before. Thus starting sshd will start some service which
'provides net' among the configured ones if none are running already. Similarly shutting down the last service that 'provide net' will shutdown all services that 'need net', since, supposedly, they can't run without.

It is semi-manual way to set up dependencies, but it works.

'net' here is just a keyword.

Usually 'net' is provided by one of the interface scripts /etc/init.d/net.eth0 which are usually in default level and are started. In your case, the only script that had 'provide net' in it was dhcpcd. so it had to carry this responsibility.

'use something' is weaker than 'need'. It says that the script can use something, but can run without it as well.
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