diff options
| author | tv <tv@krebsco.de> | 2026-11-11 22:32:04 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-11 22:32:04 +0000 |
| commit | 1dc0ba39d8103e072d8cc8676f0ac19dbe3f8e1b (patch) | |
| tree | ee657f953d7b1962e4e72e5f0f8f4a5585c8c4de | |
| parent | 6aa4bbcb26bf87710353635e3ffcc6b58facef85 (diff) | |
populate: stop the ssh master only if there is one
Populate ends by stopping the ssh master, which fails if no source
started one, e.g. for local targets, which populate doesn't reach via
ssh. Populate then exits with ssh's exit status, though all sources got
delivered. Populate now checks for a master first.
| -rw-r--r-- | pkgs/populate/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index d58d9ac..5472b5d 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -777,5 +777,8 @@ writers.writeDash "populate.${target.host}" '' ${concatStringsSep "\n" (mapAttrsToList (populate target) source)} ${flakes target source} - ${ssh' target} -q -O stop ${quote target.host} + # Stop the ssh master, if any source started one. + if ${ssh' target} -q -O check ${quote target.host} 2>/dev/null; then + ${ssh' target} -q -O stop ${quote target.host} + fi '' |
