summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/bin/hosts')
-rwxr-xr-xretiolum/bin/hosts13
1 files changed, 13 insertions, 0 deletions
diff --git a/retiolum/bin/hosts b/retiolum/bin/hosts
new file mode 100755
index 00000000..4856d494
--- /dev/null
+++ b/retiolum/bin/hosts
@@ -0,0 +1,13 @@
+#! /bin/sh
+set -euf
+
+netname=${1-retiolum}
+
+cd /etc/tinc/$netname/hosts
+
+for i in `ls`; do
+ sed -n '
+ s|^ *Subnet *= *\([^ /]*\)\(/[0-9]*\)\? *$|\1\t'$i'.'$netname' '$i'|p
+ ' $i
+done | sort
+