You are not logged in.

#1 2005-06-13 11:03:23

aufgeist
Member
Registered: 2005-06-10
Posts: 5

why 2 dhcpcd processes?

In Arch, I set eth0 to receive the address automatically by dhcp. After login, I  find there are 2 dhcpcd processes in the tree, one is Internet connection daemon, and the other is Unix domain socket daemon. Could you tell me why we need the latter, the socket daemon? When I start dhcpcd on the console (not during the system init), will only one daemon appear and everything also runs well.
I think having 2 dhcpcd processes is boring. You know, dhcpcd has a feature that dhcpcd defaultly takes the name servers from DHCP, renaming the original resolv.conf (including yp.conf, ntp.conf)  to resolv.conf.sv and will recover the resolv.conf.sv when dhcpcd closes or is terminated. So I can have my backup name server in resolv.conf. (I set my arch uses backup static address automatically when DHCP is not available. ) But with 2 dhcpcd daemons, the original resolv.conf will always be overridden. I search the /etc, but only rc.d/network script uses dhcpcd and don't find anywhere else. So why 2 dhcpcd processes produced? How can I change this?
Thanks for your attention and waiting for your answers.

Offline

#2 2005-06-13 11:18:02

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: why 2 dhcpcd processes?

I don't know why it's that way, but I've observed that one dhcpcd instance gets started with network rc.d script, while the other one is triggered by modprobing the network module. There was an issue with hotplug starting dhcpcd instance some time ago as well, but I guess it has been overcome.

Offline

#3 2005-06-13 12:07:27

Speek
Member
Registered: 2005-04-07
Posts: 36

Re: why 2 dhcpcd processes?

Dhcpcd is started by hotplug and by the network script. I have commented out the part about Arch Linux in /etc/hotplug/net.agent (line 78-81):

# elif [ -f /etc/arch-release ]; then
#      debug_mesg invoke /etc/rc.d/network hotplug_ifup $INTERFACE
#      exec /etc/rc.d/network hotplug_ifup $INTERFACE

Offline

#4 2005-06-13 13:25:02

aufgeist
Member
Registered: 2005-06-10
Posts: 5

Re: why 2 dhcpcd processes?

Speek wrote:

Dhcpcd is started by hotplug and by the network script. I have commented out the part about Arch Linux in /etc/hotplug/net.agent (line 78-81):

So clever! Now my problem resolved wonderfully! I think of the process: the program interpreting rc.conf calls rc.d/hotplug, which calls hotplug/net.agent, which calls rc.d/network, and after a while that program calls rc.d/network again, so that the network script is called twice. (By the way, which program is in charge of interpreting rc.conf?)
I read the net.agent script and consider it safe to comment out that code section.
But it is also, I think, dhcpcd's problem that each time dhcpcd is called, a new process produce, not using or first terminating the existing one.

Offline

#5 2005-06-13 14:25:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: why 2 dhcpcd processes?

aufgeist wrote:

But it is also, I think, dhcpcd's problem that each time dhcpcd is called, a new process produce, not using or first terminating the existing one.

This is a good point - I haven't delved into it, but perhaps the hotplug_ifup is a tad different (I'd assume it is).
The normal ifup, if using dhcp, will check for a pid file and fail if one exists... it seems that the hotplug version should not do anything in this case (not fail, but just end gracefully).
Go ahead and log it in the bug tracker - http://bugs.archlinux.org

Offline

#6 2005-06-13 18:23:15

Speek
Member
Registered: 2005-04-07
Posts: 36

Re: why 2 dhcpcd processes?

This bug was already filed (on January 19th): http://bugs.archlinux.org/index.php?do=details&id=2041

Offline

Board footer

Powered by FluxBB