]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - units/systemd-networkd.service.in
units: enable systemd-network-generator by default
[thirdparty/systemd.git] / units / systemd-networkd.service.in
index c8ff9be3e503fe15fca09c51aa6713a810dcf9b1..95dd2665b28132713635e713897e8eb8ae62ba36 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -8,7 +8,7 @@
 #  (at your option) any later version.
 
 [Unit]
-Description=Network Service
+Description=Network Configuration
 Documentation=man:systemd-networkd.service(8)
 ConditionCapability=CAP_NET_ADMIN
 DefaultDependencies=no
@@ -23,7 +23,8 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET
 BusName=org.freedesktop.network1
 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
 DeviceAllow=char-* rw
-ExecStart=!!@rootlibexecdir@/systemd-networkd
+ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-networkd
+ExecReload=networkctl reload
 LockPersonality=yes
 MemoryDenyWriteExecute=yes
 NoNewPrivileges=yes
@@ -37,7 +38,7 @@ ProtectSystem=strict
 Restart=on-failure
 RestartKillSignal=SIGUSR2
 RestartSec=0
-RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET AF_ALG
+RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
 RestrictNamespaces=yes
 RestrictRealtime=yes
 RestrictSUIDSGID=yes
@@ -48,13 +49,17 @@ SystemCallErrorNumber=EPERM
 SystemCallFilter=@system-service
 Type=notify
 User=systemd-network
-@SERVICE_WATCHDOG@
+{{SERVICE_WATCHDOG}}
 
 [Install]
 WantedBy=multi-user.target
 Also=systemd-networkd.socket
 Alias=dbus-org.freedesktop.network1.service
 
+# The output from this generator is used by udevd and networkd. Enable it by
+# default when enabling systemd-networkd.service.
+Also=systemd-network-generator.service
+
 # We want to enable systemd-networkd-wait-online.service whenever this service
 # is enabled. systemd-networkd-wait-online.service has
 # WantedBy=network-online.target, so enabling it only has an effect if