]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-networkd.service.in
units: drop full paths for utilities in $PATH
[thirdparty/systemd.git] / units / systemd-networkd.service.in
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]
11 Description=Network Service
12 Documentation=man:systemd-networkd.service(8)
13 ConditionCapability=CAP_NET_ADMIN
14 DefaultDependencies=no
15 # systemd-udevd.service can be dropped once tuntap is moved to netlink
16 After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
17 Before=network.target multi-user.target shutdown.target
18 Conflicts=shutdown.target
19 Wants=network.target
20
21 [Service]
22 AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
23 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
24 DeviceAllow=char-* rw
25 ExecStart=!!@rootlibexecdir@/systemd-networkd
26 LockPersonality=yes
27 MemoryDenyWriteExecute=yes
28 NoNewPrivileges=yes
29 ProtectControlGroups=yes
30 ProtectHome=yes
31 ProtectKernelModules=yes
32 ProtectKernelLogs=yes
33 ProtectSystem=strict
34 Restart=on-failure
35 RestartSec=0
36 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
37 RestrictNamespaces=yes
38 RestrictRealtime=yes
39 RestrictSUIDSGID=yes
40 RuntimeDirectory=systemd/netif
41 RuntimeDirectoryPreserve=yes
42 SystemCallArchitectures=native
43 SystemCallErrorNumber=EPERM
44 SystemCallFilter=@system-service
45 Type=notify
46 RestartKillSignal=SIGUSR2
47 User=systemd-network
48 @SERVICE_WATCHDOG@
49
50 [Install]
51 WantedBy=multi-user.target
52 Also=systemd-networkd.socket
53 Alias=dbus-org.freedesktop.network1.service
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.
59 Also=systemd-networkd-wait-online.service