2018-10-06 01:29:04 +03:00
|
|
|
[Unit]
|
|
|
|
Description=dhclient on %I
|
|
|
|
Wants=network.target
|
|
|
|
Before=network.target
|
|
|
|
|
|
|
|
[Service]
|
2018-10-08 13:40:21 +03:00
|
|
|
ExecStart=/usr/sbin/dhclient -lf /var/lib/dhclient/dhclient.leases -pf /run/dhclient@%i/dhclient.pid -d %I
|
2018-10-06 01:29:04 +03:00
|
|
|
RuntimeDirectory=dhclient@%i
|
2018-10-08 14:52:23 +03:00
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
|
|
|
|
# /var is not read-only
|
|
|
|
ProtectSystem=true
|
|
|
|
ProtectHome=true
|
2018-10-08 13:40:21 +03:00
|
|
|
RestartSec=2s
|
|
|
|
Restart=on-failure
|
2018-10-08 14:52:23 +03:00
|
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
|
|
|
|
CapabilityBoundingSet=~CAP_SYS_ADMIN
|
2018-10-06 01:29:04 +03:00
|
|
|
|
|
|
|
[Install]
|
2018-10-08 14:52:23 +03:00
|
|
|
WantedBy=multi-user.target
|