firstboot: Populate XKBLAYOUT and friends as well in vconsole.conf (#36275)
[systemd.io.git] / units / systemd-networkd.service.in
blob1bd423e2cacf0f7a898114490c94aaebb81f309f
1 #  SPDX-License-Identifier: LGPL-2.1-or-later
3 #  This file is part of systemd.
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.
10 [Unit]
11 Description=Network Configuration
12 Documentation=man:systemd-networkd.service(8)
13 Documentation=man:org.freedesktop.network1(5)
14 ConditionCapability=CAP_NET_ADMIN
15 DefaultDependencies=no
16 # systemd-udevd.service can be dropped once tuntap is moved to netlink
17 After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
18 Before=network.target multi-user.target shutdown.target initrd-switch-root.target
19 Conflicts=shutdown.target initrd-switch-root.target
20 Wants=systemd-networkd.socket network.target systemd-networkd-persistent-storage.service
22 [Service]
23 AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_BPF CAP_SYS_ADMIN
24 BusName=org.freedesktop.network1
25 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_BPF CAP_SYS_ADMIN
26 DeviceAllow=char-* rw
27 ExecStart={{LIBEXECDIR}}/systemd-networkd
28 FileDescriptorStoreMax=512
29 ImportCredential=network.wireguard.*
30 LockPersonality=yes
31 MemoryDenyWriteExecute=yes
32 NoNewPrivileges=yes
33 ProtectProc=invisible
34 ProtectClock=yes
35 ProtectControlGroups=yes
36 ProtectHome=yes
37 ProtectKernelLogs=yes
38 ProtectKernelModules=yes
39 ProtectSystem=strict
40 Restart=on-failure
41 RestartKillSignal=SIGUSR2
42 RestartSec=0
43 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
44 RestrictNamespaces=yes
45 RestrictRealtime=yes
46 RestrictSUIDSGID=yes
47 RuntimeDirectory=systemd/netif
48 RuntimeDirectoryPreserve=yes
49 SystemCallArchitectures=native
50 SystemCallErrorNumber=EPERM
51 SystemCallFilter=@system-service bpf
52 Type=notify-reload
53 User=systemd-network
54 {{SERVICE_WATCHDOG}}
56 [Install]
57 WantedBy=multi-user.target
58 Also=systemd-networkd.socket
59 Alias=dbus-org.freedesktop.network1.service
61 # The output from this generator is used by udevd and networkd. Enable it by
62 # default when enabling systemd-networkd.service.
63 Also=systemd-network-generator.service
65 # We want to enable systemd-networkd-wait-online.service whenever this service
66 # is enabled. systemd-networkd-wait-online.service has
67 # WantedBy=network-online.target, so enabling it only has an effect if
68 # network-online.target itself is enabled or pulled in by some other unit.
69 Also=systemd-networkd-wait-online.service