network: make network setup service do not depend on udev, and fix typo with greTunnels (#373931)

This commit is contained in:
Michele Guerini Rocco 2025-02-25 08:06:51 +01:00 committed by GitHub
commit 64ddb39f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,7 @@ let
(hasAttr dev cfg.macvlans) ||
(hasAttr dev cfg.sits) ||
(hasAttr dev cfg.vlans) ||
(hasAttr dev cfg.greTunnels) ||
(hasAttr dev cfg.vswitches)
then [ "${dev}-netdev.service" ]
else optional (!config.boot.isContainer) (subsystemDevice dev);
@ -94,7 +95,7 @@ let
networkSetup = lib.mkIf needNetworkSetup
{ description = "Networking Setup";
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
after = [ "network-pre.target" ];
before = [ "network.target" "shutdown.target" ];
wants = [ "network.target" ];
# exclude bridges from the partOf relationship to fix container networking bug #47210