From 2f12c7134095e684f373364e965bf8af3f3edc88 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 27 May 2011 16:29:08 +0200 Subject: retiolum/bin/hosts: initial commit --- modules/retiolum/bin/hosts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 modules/retiolum/bin/hosts (limited to 'modules') diff --git a/modules/retiolum/bin/hosts b/modules/retiolum/bin/hosts new file mode 100755 index 00000000..e0a3d5fe --- /dev/null +++ b/modules/retiolum/bin/hosts @@ -0,0 +1,11 @@ +#! /bin/sh +set -euf + +netname=${1-retiolum} + +cd /etc/tinc/$netname/hosts + +for i in `ls`; do + sed -rn 's|^ *Subnet *= *([^ /]*)(/[0-9]*)? *$|\1\t'$i' '$i'.'$netname'|p' $i +done + -- cgit v1.2.3