diff options
author | tv <tv@krebsco.de> | 2015-03-20 10:08:48 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-05-19 23:12:12 +0200 |
commit | 704249056613ac5e5c1eee3a3b447107e25e8df4 (patch) | |
tree | 8b875c6051b32e28315410a50c95a9f158583e86 /modules | |
parent | 6694dc0d0284f43e3ba540b7acba03e219b94d5f (diff) |
digitally imported the retiolum module
Diffstat (limited to 'modules')
-rw-r--r-- | modules/retiolum.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/retiolum.nix b/modules/retiolum.nix index 4011216..578547a 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 \'\' |