summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/bin/hosts')
-rwxr-xr-xretiolum/bin/hosts11
1 files changed, 11 insertions, 0 deletions
diff --git a/retiolum/bin/hosts b/retiolum/bin/hosts
new file mode 100755
index 00000000..6939f52c
--- /dev/null
+++ b/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 | sort
+