1

I see that there is a systemd service called dhcpcd5 and an init.d script called dhcpcd. Why both ways? What are the differences and how to choose which run?

Mark
  • 479
  • 11
  • 22

1 Answers1

5

Most popular distribution have changed its init system from old SysV to systemd including Debian and its flavor Raspbian. Scripts in /etc/init.d/ are leftover from SysV and they are all emulated by systemd. I think they are only available for backward compatibility of old scripts, or the maintainer of the programs still doesn't have realized that "init world" has changed and that init.d scripts will disappear more and more.

If asking what to use then you should only use systemd because that's what makes all jobs.

Ingo
  • 40,606
  • 15
  • 76
  • 189
  • In fact DO NOTHING, because `dhcpcd` runs by default. – Milliways Aug 19 '19 at 00:50
  • @ingo, newbie me don't know nothing of "dhcpcd" and never heard of "SysV". Is it related to a very old thing called "UNIX V"? Just now I goggled the following cheat sheet to get a very vague idea: "SysVinit Vs Systemd Cheatsheet":https://www.2daygeek.com/sysvinit-vs-systemd-cheatsheet-systemctl-command-usage/. I often hear the experts talking about dhcpd in access points discussions. I have zero experience in using access points, not to mention building them. Anyway, I guess I need to scan the dhcpcd related posts in this forum to pull up a little bit my low reputation. :) – tlfong01 Aug 19 '19 at 03:43
  • @Milliways: I don't like the default behavior, so I'm going to change it. For this reason I needed to understand why there are both `SysV` and `systemd` services. – Mark Aug 19 '19 at 06:12
  • 1
    @Mark If you don't like dhcpcd then you may consider to use **systemd-networkd**. Look at [three different networking systems on Raspbian](https://raspberrypi.stackexchange.com/a/89729/79866) and [Howto migrate from networking to systemd-networkd with dynamic failover](https://raspberrypi.stackexchange.com/a/78788/79866). – Ingo Aug 19 '19 at 07:56