dhcp/dhclient@.service
Mikhail Novosyolov 316b003afd Revert moving dhclient&dhclient-script from /sbin to /usr/sbin.
They can be used while booting a minimal system without /usr.
They do not depend from anything in /usr, except locales.
2018-10-12 08:17:16 +03:00

23 lines
717 B
Desktop File

[Unit]
Description=dhclient on %I
Wants=network.target
Before=network.target
[Service]
ExecStart=/sbin/dhclient -lf /var/lib/dhclient/dhclient.leases -pf /run/dhclient@%i/dhclient.pid -d %I
RuntimeDirectory=dhclient@%i
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
# /var is not read-only
ProtectSystem=true
ProtectHome=true
RestartSec=2s
Restart=on-failure
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
CapabilityBoundingSet=~CAP_SYS_ADMIN
[Install]
WantedBy=multi-user.target
# This unit file in based on
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp