nixos/networkd: use upstream wait-online@ unit

Use the upstream unit for systemd-networkd-wait-online@.service and fix
the spelling.
This commit is contained in:
Franz Pletz 2024-11-30 07:01:29 +01:00
parent 0ea5454f75
commit 0d48c50f4b
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
2 changed files with 10 additions and 10 deletions

View File

@ -2843,16 +2843,11 @@ let
];
};
systemd.services."systemd-network-wait-online@" = {
description = "Wait for Network Interface %I to be Configured";
conflicts = [ "shutdown.target" ];
requisite = [ "systemd-networkd.service" ];
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}";
};
systemd.services."systemd-networkd-wait-online@" = {
serviceConfig.ExecStart = [
""
"${config.systemd.package}/lib/systemd/systemd-networkd-wait-online -i %i ${utils.escapeSystemdExecArgs cfg.wait-online.extraArgs}"
];
};
})
@ -2872,6 +2867,7 @@ let
systemd.additionalUpstreamSystemUnits = [
"systemd-networkd-wait-online.service"
"systemd-networkd-wait-online@.service"
"systemd-networkd.service"
"systemd-networkd.socket"
"systemd-networkd-persistent-storage.service"

View File

@ -96,7 +96,11 @@ in import ./make-test-python.nix ({pkgs, ... }: {
};
testScript = ''
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")
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")
# ================================