Introduce the concept of metanodes

updates the README file, and makes the post-merge script read the
metanodes file instead of the whole hosts/ directory.
This commit is contained in:
Martin Weinelt 2015-04-18 16:34:39 +02:00
commit e3247d7cb5
3 changed files with 72 additions and 6 deletions

View file

@ -18,12 +18,12 @@ test -w $TINCCFG || fail "ERR: $TINCCFG is not writeable"
sed -i '/^ConnectTo/d' $TINCCFG
for HOST in hosts/*; do
while read HOST; do
# skip hosts without address
grep -iq '^Address' -- "$HOST" || continue
grep -iq '^Address' -- hosts/"$HOST" || continue
echo "ConnectTo = ${HOST##*/}" >> $TINCCFG
done
echo "ConnectTo = $HOST" >> $TINCCFG
done < metanodes
/usr/sbin/invoke-rc.d tinc reload icvpn