summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/hosts
blob: 4856d4947077ea16b17dd0b4f0d626245b98601b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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