1

Since I want to add an IPv6 DHCP server (using ISC's dhcpd) additionally to run parallel to my IPv4 DHCP server on my Debian Jessie (systemd) box another instance of dhcpd needs to be started but this time with the -6 parameter. I thought I would simply have a look at the current DHCP service. So

# systemctl -a | grep dhcp
  isc-dhcp-server.service                     loaded    active   running   LSB: DHCP server

shows a something that can be found at /run/systemd/generator.late/isc-dhcp-server.service and is apparently a wrapper around the SysV-style script file /etc/init.d/isc-dhcp-server.

So I thought I could just copy the SysV script, adapt it (replace every occurrence of dhcp with dhcp6 except for the binary name) and then also copy the /run/systemd/generator.late/isc-dhcp-server.service and adapt it to point to the new script and that's it but apparently I wasn't successful because systemctl -a | grep dhcp6 yields no results.

Also:

# sudo systemctl enable dhcp6.service
Failed to execute operation: No such file or directory

Any idea what I could've made wrong? Or how I could debug what I made wrong? Or is there any more comfortable and maybe less hackish way to clone a service?

1

To be quite honest, what I'd recommend here would be to ignore the SysV script altogether, and just create your own systemd script. I'm actually considering doing that for isc-dhcp-server, due to some annoying situations in which I mess stuff up and systemd doesn't even notice; it'd be a lot easier to deal with (particularly under script control) if the death of the daemon resulted in the service changing status.

  • I simply gave up on IPv6 DHCP then anyway for a different reason but I feel like your answer basically sums up nicely what probably the best approach would be. – phk Mar 25 '16 at 11:59
  • FWIW I'm hoping that a lot of these will be resolved once Debian Stretch is released; with systemd becoming the default, I would expect that proper systemd service files will be created for most key packages. That would deal with a lot of the problems. – rosuav Mar 25 '16 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.