What process is starting dhcpcd?

Ask questions about Arch Linux ARM. Please search before making a new topic.

What process is starting dhcpcd?

Postby mariosangiorgio » Fri Oct 17, 2014 6:12 pm

I have a quite standard Arch Linux setup. I installed it a few months ago on a Raspberry PI and I didn't changed much from the original system image.
I am a bit puzzled because I cannot figure out who is starting some of my services. For instance, I have both dhcpcd up and running (I see it in ps output and as I am connecting to the Raspberry PI through ssh and that machine gets an IP address through dhcp).
What is curious is that if I execute systemctl list-unit-files I get this output
$this->bbcode_second_pass_code('', '
mario@alarmpi> systemctl list-unit-files | grep dhcp
dhcpcd.service disabled
dhcpcd@.service disabled
')
That suggests that dhcpcp is not being started by systemd so I'm quite curious to learn who is actually starting it and to understand if this is the best setup.
Conversely, if I do the same thing for sshd it looks like it is actually managed by systemd, which increases my confusion about my configuration
$this->bbcode_second_pass_code('', '
[127] mario@alarmpi> systemctl list-unit-files | grep ssh
sshd.service enabled
sshd@.service static
sshdgenkeys.service static
sshd.socket disabled
')
mariosangiorgio
 
Posts: 7
Joined: Fri Oct 17, 2014 6:09 pm

Re: What process is starting dhcpcd?

Postby pepedog » Fri Oct 17, 2014 6:42 pm

Network, it might be either netctl-ifplugd@eth0 or systemd-networkd@eth0 (both systemd, don't get confused), depending on how old image that was used
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: What process is starting dhcpcd?

Postby mariosangiorgio » Fri Oct 17, 2014 10:22 pm

Thanks, I suspected that dhcpcd was started by some other service.

There is just a thing that is not completely clear. Do netctl-ifplugd@eth0 or systemd-networkd@eth0 invoke the dhcpcd service beyond the scenes or do they simply start the daemon by themselves?
mariosangiorgio
 
Posts: 7
Joined: Fri Oct 17, 2014 6:09 pm

Re: What process is starting dhcpcd?

Postby krabat » Sun Nov 09, 2014 3:52 pm

When netctl was default to handle the network the workflow was like so: netctl-ifplugd@eth0.service was enabled by a static (i. e. available without running systemctl enable) link in /etc/systemd/system/multi-user.wants. This service unit was launching ifplugd with /etc/ifplugd/netctl.action as argument of switch --run. Script netctl.action, which still is part of netctl, configured eth0 via netctl profile /etc/netctl/eth0 (not available any more) which in turn was launching dhcpcd.

systemd-networkd is not using dhcpcd at all but systemd's own DHCP client implementation.
The workflow with systemd-networkd is slightly easier, btw. systemd-networkd.service is enabled statically as described above and configuring eth0 via etc/systemd/network/eth0.network.
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm

Re: What process is starting dhcpcd?

Postby WarheadsSE » Mon Nov 10, 2014 5:25 pm

@krabat
That description of netctl-ifplugd is close, but not quite. The @eth0 is the interface name, not the profile name.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: What process is starting dhcpcd?

Postby pepedog » Mon Nov 10, 2014 5:51 pm

I just noticed I added an @eth0 on the end of systemd-networkd, which is wrong
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: What process is starting dhcpcd?

Postby krabat » Mon Nov 10, 2014 6:00 pm

@WarheadsSE
But I didn't claim @eth0 was a profile!? The only thing I called a profile was file /etc/netcl/eth0 which is imo corresponding to the man page$this->bbcode_second_pass_quote('man (5) netctl.profile', 'P')rofiles for netctl live under /etc/netctl/ and are plain text files.
And sure, @eth0 is an interface, belonging to netctl-ifplugd@eth0.service, a unit of an instantiated systemd service.
So all in all I'm sorry, but I don't quiet get your point here.
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 3 guests