summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/bin/hosts
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-27 17:07:04 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-27 17:07:04 +0200
commite338c4d436efcb2661740a7d49fdc782b8a8a4e0 (patch)
tree44f201f07bbfaa8af4531654f3790ed05435f2ac /modules/retiolum/bin/hosts
parent402a70a9c1df350cf6911ec5b1372d7c1efdc6b4 (diff)
parent44f7bd49755aab8434fad4a42b96e68c7924fa19 (diff)
resolved conflict in install.sh
Diffstat (limited to 'modules/retiolum/bin/hosts')
-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
+