summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/hosts
blob: 6939f52c0d012c525029c6b489c5de7d60b98fd3 (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 | sort