diff options
author | tv <tv@krebsco.de> | 2016-04-17 05:24:33 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-04-17 05:24:33 +0200 |
commit | 6ec3d922a48ad6a583315a4433a7170e6850c676 (patch) | |
tree | e66cc9279d2524e9b0caf0a963e00f2479f008cb /krebs/3modules | |
parent | affb69250d13f64d2be14327c1b47d23cadcb987 (diff) |
krebs.backup network-ssh-port -> pkgs.get-ssh-port
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/backup.nix | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix index e85a3dfa8..f90081501 100644 --- a/krebs/3modules/backup.nix +++ b/krebs/3modules/backup.nix @@ -113,7 +113,7 @@ let src=$src_path dst_user=root dst_host=$(${fastest-address plan.dst.host}) - dst_port=$(${network-ssh-port plan.dst.host "$dst_host"}) + dst_port=$(${pkgs.get-ssh-port}/bin/get-ssh-port "$dst_host") dst_path=${shell.escape plan.dst.path} dst=$dst_user@$dst_host:$dst_path echo "update snapshot: current; $src -> $dst" >&2 @@ -137,7 +137,7 @@ let identity=${shell.escape plan.dst.host.ssh.privkey.path} src_user=root src_host=$(${fastest-address plan.src.host}) - src_port=$(${network-ssh-port plan.src.host "$src_host"}) + src_port=$(${pkgs.get-ssh-port}/bin/get-ssh-port "$src_host") src_path=${shell.escape plan.src.path} src=$src_user@$src_host:$src_path dst_path=${shell.escape plan.dst.path} @@ -224,19 +224,6 @@ let | ${pkgs.coreutils}/bin/head -1; } ''; - # Note that we don't escape word on purpose, so we can deref shell vars. - # TODO type word - network-ssh-port = host: word: '' - case ${word} in - ${concatStringsSep ";;\n" (mapAttrsToList - (_: net: "(${head net.aliases}) echo ${toString net.ssh.port}") - host.nets)};; - (*) - echo network-ssh-port: unhandled case: ${word} >&2 - exit 1 - esac - ''; - in out # TODO ionice # TODO mail on failed push, pull |