summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-08 00:31:26 +0100
committertv <tv@krebsco.de>2016-02-08 00:31:26 +0100
commit14afbfef1251178b1599caaf9046c6aeeb97fb19 (patch)
tree75c1f9dc86a3f9bff145a81f62386748d3167991
parent5a10c4beb56d052b816682058becedf7b8eacaaa (diff)
krebs.backup: use aliases instead of addrs4
-rw-r--r--krebs/3modules/backup.nix6
1 files changed, 2 insertions, 4 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 6e9e9813c..86e2e72e2 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -204,12 +204,10 @@ let
'';
# XXX Is one ping enough to determine fastest address?
- # Note that we're using net.addrs4 instead of net.aliases because we define
- # ports only for addresses. See krebs/3modules/default.nix
fastest-address = host: ''
{ ${pkgs.fping}/bin/fping </dev/null -a \
${concatMapStringsSep " " shell.escape
- (mapAttrsToList (_: net: head net.addrs4) host.nets)} \
+ (mapAttrsToList (_: net: head net.aliases) host.nets)} \
| ${pkgs.coreutils}/bin/head -1; }
'';
@@ -218,7 +216,7 @@ let
network-ssh-port = host: word: ''
case ${word} in
${concatStringsSep ";;\n" (mapAttrsToList
- (_: net: "(${head net.addrs4}) echo ${toString net.ssh.port}")
+ (_: net: "(${head net.aliases}) echo ${toString net.ssh.port}")
host.nets)};;
esac
'';