]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - units/systemd-networkd.service.in
units: automatically revert to /run logging on shutdown if necessary
[thirdparty/systemd.git] / units / systemd-networkd.service.in
... / ...
CommitLineData
1# SPDX-License-Identifier: LGPL-2.1+
2#
3# This file is part of systemd.
4#
5# systemd is free software; you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; either version 2.1 of the License, or
8# (at your option) any later version.
9
10[Unit]
11Description=Network Service
12Documentation=man:systemd-networkd.service(8)
13ConditionCapability=CAP_NET_ADMIN
14DefaultDependencies=no
15# systemd-udevd.service can be dropped once tuntap is moved to netlink
16After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
17Before=network.target multi-user.target shutdown.target
18Conflicts=shutdown.target
19Wants=network.target
20
21[Service]
22AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
23CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
24ExecStart=!!@rootlibexecdir@/systemd-networkd
25LockPersonality=yes
26MemoryDenyWriteExecute=yes
27NoNewPrivileges=yes
28ProtectControlGroups=yes
29ProtectHome=yes
30ProtectKernelModules=yes
31ProtectSystem=strict
32Restart=on-failure
33RestartSec=0
34RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
35RestrictNamespaces=yes
36RestrictRealtime=yes
37RestrictSUIDSGID=yes
38RuntimeDirectory=systemd/netif
39RuntimeDirectoryPreserve=yes
40SystemCallArchitectures=native
41SystemCallErrorNumber=EPERM
42SystemCallFilter=@system-service
43Type=notify
44User=systemd-network
45WatchdogSec=3min
46
47[Install]
48WantedBy=multi-user.target
49Also=systemd-networkd.socket
50Alias=dbus-org.freedesktop.network1.service
51
52# We want to enable systemd-networkd-wait-online.service whenever this service
53# is enabled. systemd-networkd-wait-online.service has
54# WantedBy=network-online.target, so enabling it only has an effect if
55# network-online.target itself is enabled or pulled in by some other unit.
56Also=systemd-networkd-wait-online.service