summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/bin/hosts
blob: e0a3d5fe5774bbb563f6e12e5c9470b254c36bd4 (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 *= *([^ /]*)(/[0-9]*)? *$|\1\t'$i' '$i'.'$netname'|p' $i
done