summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/backup.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-04-17 04:13:32 +0200
committertv <tv@krebsco.de>2016-04-17 04:13:32 +0200
commitaffb69250d13f64d2be14327c1b47d23cadcb987 (patch)
tree3b231b6c57919649800822d246209d8642c85c6e /krebs/3modules/backup.nix
parent453384b60b628f97074c74940e88570aa8eab811 (diff)
krebs.backup network-ssh-port: fail if cannot find port
Diffstat (limited to 'krebs/3modules/backup.nix')
-rw-r--r--krebs/3modules/backup.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 1e926429a..e85a3dfa8 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -120,11 +120,11 @@ let
dst_exec() {
exec ssh -F /dev/null \
-i "$identity" \
- ''${dst_port:+-p $dst_port} \
+ -p $dst_port \
"$dst_user@$dst_host" \
-T "exec$(printf ' %q' "$@")"
}
- rsh="ssh -F /dev/null -i $identity ''${dst_port:+-p $dst_port}"
+ rsh="ssh -F /dev/null -i $identity -p $dst_port"
local_rsync() {
rsync "$@"
}
@@ -146,7 +146,7 @@ let
dst_exec() {
exec "$@"
}
- rsh="ssh -F /dev/null -i $identity ''${src_port:+-p $src_port}"
+ rsh="ssh -F /dev/null -i $identity -p $src_port"
local_rsync() {
mkdir -m 0700 -p ${shell.escape plan.dst.path}/current
flock -n ${shell.escape plan.dst.path} rsync "$@"
@@ -231,6 +231,9 @@ let
${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
'';