]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/systemd-networkd.service.in
Merge pull request #14592 from keszybz/simplifications
[thirdparty/systemd.git] / units / systemd-networkd.service.in
CommitLineData
a7df2d1e
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
f579559b
TG
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)
689d781b 13ConditionCapability=CAP_NET_ADMIN
f579559b 14DefaultDependencies=no
5f004d1e 15# systemd-udevd.service can be dropped once tuntap is moved to netlink
696fc836 16After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
689d781b
LP
17Before=network.target multi-user.target shutdown.target
18Conflicts=shutdown.target
f579559b
TG
19Wants=network.target
20
21[Service]
c61f302d 22AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
3ca9940c 23CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
9af28206 24DeviceAllow=char-* rw
3ca9940c
LP
25ExecStart=!!@rootlibexecdir@/systemd-networkd
26LockPersonality=yes
27MemoryDenyWriteExecute=yes
28NoNewPrivileges=yes
0c28d51a 29ProtectControlGroups=yes
3ca9940c 30ProtectHome=yes
b6c7278c 31ProtectKernelModules=yes
6168ae58 32ProtectKernelLogs=yes
3ca9940c
LP
33ProtectSystem=strict
34Restart=on-failure
35RestartSec=0
0c28d51a 36RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
3ca9940c
LP
37RestrictNamespaces=yes
38RestrictRealtime=yes
62aa2924 39RestrictSUIDSGID=yes
c61f302d
YW
40RuntimeDirectory=systemd/netif
41RuntimeDirectoryPreserve=yes
3ca9940c
LP
42SystemCallArchitectures=native
43SystemCallErrorNumber=EPERM
44SystemCallFilter=@system-service
45Type=notify
ab76be55 46RestartKillSignal=SIGUSR2
3ca9940c 47User=systemd-network
21d0dd5a 48@SERVICE_WATCHDOG@
c4a0b20c
JD
49
50[Install]
51WantedBy=multi-user.target
5544ee85 52Also=systemd-networkd.socket
fb369a5b 53Alias=dbus-org.freedesktop.network1.service
9e496560
ZJS
54
55# We want to enable systemd-networkd-wait-online.service whenever this service
56# is enabled. systemd-networkd-wait-online.service has
57# WantedBy=network-online.target, so enabling it only has an effect if
58# network-online.target itself is enabled or pulled in by some other unit.
59Also=systemd-networkd-wait-online.service