summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authortv <tv@also>2011-05-27 16:29:08 +0200
committertv <tv@also>2011-05-27 16:37:16 +0200
commit2f12c7134095e684f373364e965bf8af3f3edc88 (patch)
treee6a91dfbf9e2938b4864e0fcca83188be69749a6 /modules
parentfa752fe606ec2d91ca69db0c0f7eb6de7fae4860 (diff)
retiolum/bin/hosts: initial commit
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/retiolum/bin/hosts11
1 files changed, 11 insertions, 0 deletions
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
+