[Unit] Description=dhclient on %I Wants=network.target Before=network.target [Service] ExecStart=/usr/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