summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/bin/hosts
blob: b5b294307203ac702db5ad432f649002065199f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh
set -euf

netname=${1-retiolum}

cd /etc/tinc/$netname/hosts

for i in `ls`; do
  sed -rn 's|^ *Subnet *= *([^ ]*) *$|\1\t'$i' '$i'.'$netname'|p' $i
done