0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/networkd: use upstream wait-online@ unit (#360319)

This commit is contained in:
Franz Pletz 2024-12-03 21:40:30 +01:00 committed by GitHub
commit f9f7d7b58c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View file

@ -2844,16 +2844,11 @@ let
]; ];
}; };
systemd.services."systemd-network-wait-online@" = { systemd.services."systemd-networkd-wait-online@" = {
description = "Wait for Network Interface %I to be Configured"; serviceConfig.ExecStart = [
conflicts = [ "shutdown.target" ]; ""
requisite = [ "systemd-networkd.service" ]; "${config.systemd.package}/lib/systemd/systemd-networkd-wait-online -i %i ${utils.escapeSystemdExecArgs cfg.wait-online.extraArgs}"
after = [ "systemd-networkd.service" ]; ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${config.systemd.package}/lib/systemd/systemd-networkd-wait-online -i %I ${utils.escapeSystemdExecArgs cfg.wait-online.extraArgs}";
};
}; };
}) })
@ -2873,6 +2868,7 @@ let
systemd.additionalUpstreamSystemUnits = [ systemd.additionalUpstreamSystemUnits = [
"systemd-networkd-wait-online.service" "systemd-networkd-wait-online.service"
"systemd-networkd-wait-online@.service"
"systemd-networkd.service" "systemd-networkd.service"
"systemd-networkd.socket" "systemd-networkd.socket"
"systemd-networkd-persistent-storage.service" "systemd-networkd-persistent-storage.service"

View file

@ -96,7 +96,11 @@ in import ./make-test-python.nix ({pkgs, ... }: {
}; };
testScript = '' testScript = ''
start_all() start_all()
node1.succeed("systemctl start systemd-networkd-wait-online@eth1.service")
node1.wait_for_unit("systemd-networkd-wait-online@eth1.service")
node1.wait_for_unit("systemd-networkd-wait-online.service") node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.succeed("systemctl start systemd-networkd-wait-online@eth1.service")
node2.wait_for_unit("systemd-networkd-wait-online@eth1.service")
node2.wait_for_unit("systemd-networkd-wait-online.service") node2.wait_for_unit("systemd-networkd-wait-online.service")
# ================================ # ================================