Cam Graham
Cam Graham

Reputation: 1

How to ensure the dnsmaq log network share location exists before the dnsmasq service starts up?

I have autofs mounting a network share on demand, and dnsmasq providing DNS to my local network. dnsmasq is set to write logs to the network share. On reboot the share doesnt seem to be set up before the dnsmasq service starts, so dnsmasq gives up on writing logs until its restarted, when it then write logs just fine. So I need some method to ensure the network share is set up before dnsmasq itself starts up.

Upvotes: 0

Views: 24

Answers (1)

Cam Graham
Cam Graham

Reputation: 1

Answering my own question - edit the systemd startup service definition files for dnsmasq and autofs, adding Requires and After/Before statements to ensure dnsmasq doesnt start until autofs does. Can verify this with

$ systemd-analyze plot

Upvotes: 0

Related Questions