summaryrefslogtreecommitdiffstats
path: root/modules/retiolum.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-03-20 10:08:48 +0100
committertv <tv@shackspace.de>2015-05-19 23:12:12 +0200
commit97852ac83f31326540ab5b7bc344a5048b9365fe (patch)
tree8b875c6051b32e28315410a50c95a9f158583e86 /modules/retiolum.nix
parent29d168ae28fd909c78c6b458a2905d705a36ddbc (diff)
digitally imported the retiolum module
Diffstat (limited to 'modules/retiolum.nix')
-rw-r--r--modules/retiolum.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/retiolum.nix b/modules/retiolum.nix
index 40112165b..578547af6 100644
--- a/modules/retiolum.nix
+++ b/modules/retiolum.nix
@@ -125,8 +125,12 @@ with lib;
(cd ${hosts}
printf \'\'
for i in `ls`; do
+ names=$(hostnames $i)
+ for j in `sed -En 's|^ *Aliases *= *(.+)|\1|p' $i`; do
+ names="$names $(hostnames $j)"
+ done
sed -En '
- s|^ *Subnet *= *([^ /]*)(/[0-9]*)? *$|\1 '"$(hostnames $i)"'|p
+ s|^ *Subnet *= *([^ /]*)(/[0-9]*)? *$|\1 '"$names"'|p
' $i
done | sort
printf \'\'