Score:1

How do I tell systemd to start isc-dhcp-server after slapd?

cn flag

I have installed isc-dhcp-server-ldap and keep my DHCP configuration in OpenLDAP. This works perfectly.

However, when I reboot my server, isc-dhcp-server is not started:

s-hrt1# systemctl --failed
  UNIT                        LOAD   ACTIVE SUB    DESCRIPTION
● isc-dhcp-server.service     loaded failed failed ISC DHCP IPv4 server
● systemd-random-seed.service loaded failed failed Load/Save Random Seed
● systemd-rfkill.service      loaded failed failed Load/Save RF Kill Switch Status
● systemd-rfkill.socket       loaded failed failed Load/Save RF Kill Switch Status /dev/rfkill Watch

journalctl -xeu isc-dhcp-server reveals messages like the following:

Jun 20 06:07:36 s-hrt1 dhcpd[703]: Cannot set LDAP TLS crl check option: Can't contact LDAP server

If I manually restart isc-dhcp-server with systemctl restart it comes up with no problem.

I assume that slapd, the OpenLDAP server, is not ready when isc-dhcp-server starts. How do I tell systemd to wait for slapd before starting isc-dhcp-server?

Score:1
nc flag

https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Requires=

The documentation says that if you want to control the order you have to use a combination of Requires with Before/After.

I would assume it's something like this:

[Unit]
Description=Start isc-dhcp-server
Requires=slapd.service
After=slapd.service```
Stephen Winnall avatar
cn flag
Thanks, I’ll try that out later.
Stephen Winnall avatar
cn flag
Sorry for the delay. Yes, that solved the problem for me. Thank you.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.