diff --git a/dhclient@.service b/dhclient@.service index de70b16..27a4042 100644 --- a/dhclient@.service +++ b/dhclient@.service @@ -18,3 +18,6 @@ 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 diff --git a/dhcpd.service b/dhcpd.service index e832b02..278ea7e 100644 --- a/dhcpd.service +++ b/dhcpd.service @@ -14,7 +14,8 @@ PIDFile=/run/dhcpd/dhcpd.pid User=isc-dhcpd AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW CapabilityBoundingSet=~CAP_SYS_ADMIN -ProtectSystem=full +# not ProtectSystem=full because we need a writable leases file in /var +ProtectSystem=true ProtectHome=true KillSignal=SIGINT # We pull in network-online.target for a configured network connection. @@ -27,3 +28,6 @@ StartLimitInterval=12s [Install] WantedBy=multi-user.target + +# This unit file in based on ROSA's unit file and Arch's +# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp diff --git a/dhcpd6.service b/dhcpd6.service index af7de4e..f4c3bea 100644 --- a/dhcpd6.service +++ b/dhcpd6.service @@ -1,10 +1,9 @@ [Unit] -Description=DHCPv6 Server Daemon +Description=DHCPv4 Server Daemon Documentation=man:dhcpd(8) man:dhcpd.conf(5) Wants=network-online.target # ldap.service: probably LDAP server starts first and dhcpd must start providing DHCP server only after LDAP has started to use LDAP for IP addresses (?) -# network-online.target seems unreasonable because network is probsbly not online on the DHCP server in a local network -After=network.target time-sync.target ldap.service +After=network-online.target time-sync.target ldap.service [Service] Environment=CONFIGFILE=/etc/dhcpd6.conf LEASEFILE=/var/lib/dhcpd/dhcpd6.leases @@ -14,8 +13,10 @@ ExecStart=/usr/sbin/dhcpd -6 -pf /run/dhcpd/dhcpd6.pid -cf $CONFIGFILE -lf $LEAS PIDFile=/run/dhcpd/dhcpd6.pid User=isc-dhcpd AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW -ProtectSystem=full -ProtectHome=on +CapabilityBoundingSet=~CAP_SYS_ADMIN +# not ProtectSystem=full because we need a writable leases file in /var +ProtectSystem=true +ProtectHome=true KillSignal=SIGINT # We pull in network-online.target for a configured network connection. # However this is not guaranteed to be the network connection our @@ -27,3 +28,6 @@ StartLimitInterval=12s [Install] WantedBy=multi-user.target + +# This unit file in based on ROSA's unit file and Arch's +# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp