]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-networkd.service.m4.in
units: drop explicit NotifyAccess setting from journald's unit file (#5749)
[thirdparty/systemd.git] / units / systemd-networkd.service.m4.in
1 # This file is part of systemd.
2 #
3 # systemd is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as published by
5 # the Free Software Foundation; either version 2.1 of the License, or
6 # (at your option) any later version.
7
8 [Unit]
9 Description=Network Service
10 Documentation=man:systemd-networkd.service(8)
11 ConditionCapability=CAP_NET_ADMIN
12 DefaultDependencies=no
13 # systemd-udevd.service can be dropped once tuntap is moved to netlink
14 After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
15 Before=network.target multi-user.target shutdown.target
16 Conflicts=shutdown.target
17 Wants=network.target
18
19 # On kdbus systems we pull in the busname explicitly, because it
20 # carries policy that allows the daemon to acquire its name.
21 Wants=org.freedesktop.network1.busname
22 After=org.freedesktop.network1.busname
23
24 [Service]
25 Type=notify
26 Restart=on-failure
27 RestartSec=0
28 ExecStart=@rootlibexecdir@/systemd-networkd
29 WatchdogSec=3min
30 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER
31 ProtectSystem=strict
32 ProtectHome=yes
33 ProtectControlGroups=yes
34 ProtectKernelModules=yes
35 MemoryDenyWriteExecute=yes
36 RestrictRealtime=yes
37 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
38 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
39 SystemCallArchitectures=native
40 ReadWritePaths=/run/systemd
41
42 [Install]
43 WantedBy=multi-user.target
44 Also=systemd-networkd.socket
45
46 # We want to enable systemd-networkd-wait-online.service whenever this service
47 # is enabled. systemd-networkd-wait-online.service has
48 # WantedBy=network-online.target, so enabling it only has an effect if
49 # network-online.target itself is enabled or pulled in by some other unit.
50 Also=systemd-networkd-wait-online.service