summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-28 19:24:53 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-28 19:24:53 +0200
commitc5b7ea987a2e209bc553a89c340d0a208f926c71 (patch)
treeac3c91bad163868f4246980915b9d240edae9b6d /src/systemd
parent867a0b71acc3f1cbbcfad553952bdbc82070ae4b (diff)
downloadvyos-1x-c5b7ea987a2e209bc553a89c340d0a208f926c71.tar.gz
vyos-1x-c5b7ea987a2e209bc553a89c340d0a208f926c71.zip
dhclient: T2393: migrate from SysVinit to systemd
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/dhclient@.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/systemd/dhclient@.service b/src/systemd/dhclient@.service
new file mode 100644
index 000000000..5e185908b
--- /dev/null
+++ b/src/systemd/dhclient@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=DHCP client on %i (IPv4)
+Documentation=man:dhclient(8)
+RequiresMountsFor=/run
+ConditionPathExists=/run/dhclient/%i.conf
+ConditionPathExists=/run/dhclient/%i.options
+After=vyos-router.service
+
+[Service]
+WorkingDirectory=/run/dhclient
+Type=simple
+EnvironmentFile=-/run/dhclient/%i.options
+PIDFile=/run/dhclient/%i.pid
+ExecStart=/sbin/dhclient -4 $DHCLIENT_OPTS
+ExecStop=/sbin/dhclient -4 $DHCLIENT_OPTS -r
+Restart=always
+
+[Install]
+WantedBy=multi-user.target