summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2015-12-21 09:24:18 +0100
committerGravatar Christian Hesse <mail@eworm.de>2015-12-21 09:24:18 +0100
commitefc8653ecd567197ef60ebd3386ffd77d5b74a4d (patch)
tree7ea3da120c6af86e9b067b9fc44ef2584aef2e5a
parenta9e268bf2e9b3103ad03f55812ef0584f5bc28fd (diff)
downloaddyndhcpd-efc8653ecd567197ef60ebd3386ffd77d5b74a4d.tar.gz
dyndhcpd-efc8653ecd567197ef60ebd3386ffd77d5b74a4d.tar.zst
make systemd unit require the network device
-rw-r--r--Makefile2
-rw-r--r--systemd/dyndhcpd@.service (renamed from dyndhcpd@.service)1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0553e0f..5ac0a4e 100644
--- a/Makefile
+++ b/Makefile
@@ -30,9 +30,9 @@ install: install-bin install-doc
install-bin: dyndhcpd
$(INSTALL) -D -m0755 dyndhcpd $(DESTDIR)/usr/bin/dyndhcpd
- $(INSTALL) -D -m0644 dyndhcpd@.service $(DESTDIR)/usr/lib/systemd/system/dyndhcpd@.service
$(INSTALL) -D -m0644 config/dhcpd.conf $(DESTDIR)/etc/dyndhcpd/dhcpd.conf
$(INSTALL) -D -m0644 config/ipxe-options.conf $(DESTDIR)/etc/dyndhcpd/ipxe-options.conf
+ $(INSTALL) -D -m0644 systemd/dyndhcpd@.service $(DESTDIR)/usr/lib/systemd/system/dyndhcpd@.service
install-doc: README.html
$(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/dyndhcpd/README.md
diff --git a/dyndhcpd@.service b/systemd/dyndhcpd@.service
index ce49fd8..8eb1867 100644
--- a/dyndhcpd@.service
+++ b/systemd/dyndhcpd@.service
@@ -1,6 +1,7 @@
[Unit]
Description=IPv4 DHCP server for interface %i
After=network.target
+Requires=sys-subsystem-net-devices-%i.device
[Service]
ExecStart=/usr/bin/dyndhcpd -i%i