diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset index 6b5349dc8df..3ba4bb760df 100644 --- a/system-preset/90-systemd.preset +++ b/system-preset/90-systemd.preset @@ -15,7 +15,6 @@ enable getty@.service enable systemd-timesyncd.service enable systemd-networkd.service enable systemd-resolved.service -enable systemd-networkd-wait-online.service disable console-getty.service disable debug-shell.service diff --git a/units/systemd-networkd.service.m4.in b/units/systemd-networkd.service.m4.in index c3f153046a8..5811b008190 100644 --- a/units/systemd-networkd.service.m4.in +++ b/units/systemd-networkd.service.m4.in @@ -42,3 +42,9 @@ ReadWritePaths=/run/systemd [Install] WantedBy=multi-user.target Also=systemd-networkd.socket + +# We want to enable systemd-networkd-wait-online.service whenever this service +# is enabled. systemd-networkd-wait-online.service has +# WantedBy=network-online.target, so enabling it only has an effect if +# network-online.target itself is enabled or pulled in by some other unit. +Also=systemd-networkd-wait-online.service