From 97852ac83f31326540ab5b7bc344a5048b9365fe Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Mar 2015 10:08:48 +0100 Subject: digitally imported the retiolum module --- modules/retiolum.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 \'\' -- cgit v1.2.3