From: Wolfgang Bumiller Date: Wed, 22 Nov 2023 13:22:13 +0000 (+0100) Subject: install dnsmasq@.service snippet X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f9497f55e8809a8e8b27256ebe195a1f5a52b5a7;p=matthieu%2Fpve-network.git install dnsmasq@.service snippet To - start after networking.service (in order to make sure ifupdown has created all the interfaces before dnsmasq tries to find them via the 'interfaces=' lines. - drop the 'Requires=network.target' since it is not a *provider* of that target Signed-off-by: Wolfgang Bumiller --- diff --git a/src/Makefile b/src/Makefile index 36f90db..c9dee4c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,10 +1,12 @@ +SUBDIRS := PVE services + all: - $(MAKE) -C PVE + set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done .PHONY: clean clean: $(MAKE) -C test $@ - $(MAKE) -C PVE $@ + set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done .PHONY: test test: @@ -12,4 +14,4 @@ test: .PHONY: install install: - $(MAKE) -C PVE $@ + set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done diff --git a/src/services/00-dnsmasq-after-networking.conf b/src/services/00-dnsmasq-after-networking.conf new file mode 100644 index 0000000..f8b825b --- /dev/null +++ b/src/services/00-dnsmasq-after-networking.conf @@ -0,0 +1,12 @@ +# dnsmasq@.service comes with +# Requires=network.target +# After=network.target +# Only the After entry makes sense as `network.target` is a passive rule and +# `Require`ing it means that dnsmasq is the "provider" of that unit. +# See https://systemd.io/NETWORK_ONLINE +# +# Additionally, we want ifupdown to have completed its setup, to make sure +# the 'interface=' directives can find the required interfaces at startup. +[Unit] +Requires= +After=networking.service diff --git a/src/services/Makefile b/src/services/Makefile new file mode 100644 index 0000000..818c106 --- /dev/null +++ b/src/services/Makefile @@ -0,0 +1,14 @@ +SERVICEDIR=$(DESTDIR)/lib/systemd/system + +all: + @true + +.PHONY: install +install: + install -d $(SERVICEDIR) + install -d $(SERVICEDIR)/dnsmasq@.service.d + install -t $(SERVICEDIR)/dnsmasq@.service.d -m 0644 00-dnsmasq-after-networking.conf + +.PHONY: clean +clean: + @true