1

I'm on a beaglebone black running a debian 10 console image. A bit of an odd setup that I have, but I need to make it run that way.

The issue: isc-dhcp-server fails to start at boot, but does start afterwards starting it by hand, typing :

#systemctl start isc-dhcp-server

The Beaglebone black, all that stuff is running on, after boot energizes the Ethernet Hub/Switch it is connected to. (systemd starts a program that does that)

the following is more an educated guess:

So while booting, at the moment systemd tries to start isc-dhcp-server, it doesn't detect a cable connected to eth0 and fails to start.

my solution would be: using some systemd magic to start the dhcp server after cable on eth0 is connected. systemd makes it easy to say when to start the services, but I cannot find a .service file for isc-dhcp-server, and cannot figure out how it gets started.

Any hints on that, please. thanks, Juergen

1 Answers1

2

The packaged services normally have their .service files at /lib/systemd/system/.

But the package maintainer may have been relying on the SysVinit compatibility mechanism: if there is no .service file at all for it, but /etc/init.d/isc-dhcp-server script exists, systemd will auto-generate a service definition for it, setting the service dependencies based on the LSB structured comment lines in the beginning of the script.

You can always use systemctl cat isc-dhcp-server to view the current service definition, and systemctl edit isc-dhcp-server to create a persistent override file to make changes or additions to the service definition - even if the main definition is generated dynamically from a SysVinit script.

telcoM
  • 4,153
  • 12
  • 23
  • Thank you so much, your answer brought me on the right track. It still took me a while to get it all going. I didn't know about systemctl cat/edit and in my case it was worth a try but didn't do it. – Juergen Gnoss Dec 23 '20 at 22:31
  • You might want to wait a day or two for other answers, then mark the best one as "accepted": as a question author, you will always be able to do that even if you don't yet have the reputation to vote otherwise. Marking the answer as "accepted" is even slightly better than a regular upvote. Or you can even write your own answer to describe how you ultimately solved it. – telcoM Dec 23 '20 at 22:36