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:
commit
f9f7d7b58c
2 changed files with 10 additions and 10 deletions
|
@ -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"
|
||||||
|
|
|
@ -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")
|
||||||
|
|
||||||
# ================================
|
# ================================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue