diff options
author | Michael Biebl <biebl@debian.org> | 2020-08-26 16:54:45 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2020-08-26 16:54:45 +0200 |
commit | 2c0dffe82db574b6b9e850e48f444674e4e1d7ea (patch) | |
tree | 8441ad108c5127778e34f2a2a61306459cae7c40 /units | |
parent | b6abc2acb4a56344db90eefa36a989e6b7ded34d (diff) | |
download | systemd-2c0dffe82db574b6b9e850e48f444674e4e1d7ea.tar.gz |
networkd: use socket activation when starting networkd
Add After=systemd-networkd.socket to avoid a race condition and networkd
falling back to the non-socket activation code.
Also add Wants=systemd-networkd.socket, so the socket is started when
networkd is started via `systemctl start systemd-networkd.service`.
A Requires is not strictly necessary, as networkd still ships the
non-socket activation code. Should this code be removed one day, the
Wants should be bumped to Requires accordingly.
See also 5544ee85163733eaa50f598fcf3bd9421d4a42f9.
Fixes: #16809
Diffstat (limited to 'units')
-rw-r--r-- | units/systemd-networkd.service.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/units/systemd-networkd.service.in b/units/systemd-networkd.service.in index 6ccbb5a95d..938aef9d17 100644 --- a/units/systemd-networkd.service.in +++ b/units/systemd-networkd.service.in @@ -13,10 +13,10 @@ Documentation=man:systemd-networkd.service(8) ConditionCapability=CAP_NET_ADMIN DefaultDependencies=no # systemd-udevd.service can be dropped once tuntap is moved to netlink -After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service +After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service Before=network.target multi-user.target shutdown.target Conflicts=shutdown.target -Wants=network.target +Wants=systemd-networkd.socket network.target [Service] AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW |