From c861158c8cd34972db168c2c06ce63ba6072b30e Mon Sep 17 00:00:00 2001 From: d3v11 Date: Wed, 21 Dec 2011 00:10:44 +0000 Subject: updates to peer2anonet, added "static bird" --- contrib/peer2anonet/README.html | 4 ++++ contrib/peer2anonet/peer2anonet | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/README.html b/contrib/peer2anonet/README.html index 6866354..52c732b 100644 --- a/contrib/peer2anonet/README.html +++ b/contrib/peer2anonet/README.html @@ -93,6 +93,10 @@ CONFIGURATION FILES: + If /etc/peer2anonet/bird.conf exists, then peer2anonet + will not create a new bird. Instead it will use this + bird.conf and append new protocols to it. + /etc/peer2anonet/peers/$PEER/* contains: asn local_port peering_ip pubkey remote_ip remote_port run seckey diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 152f4a4..4895df2 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -142,7 +142,10 @@ UPDATE(){ bird -c bird.conf -d' > /services/bird/run chmod +x /services/bird/run - echo "function n_AnoNet_mine (prefix arg) { + if [ -e /etc/peer2anonet/bird.conf ]; then + cp /etc/peer2anonet/bird.conf /services/bird/bird.conf + else + echo "function n_AnoNet_mine (prefix arg) { if arg ~ [ $P2A_NET/24+ ] then return true; return false; }; @@ -190,6 +193,7 @@ protocol direct direct_AnoNet_routes { table AnoNet_routes; interface \"eth0\"; import filter only_AnoNet; }" > /services/bird/bird.conf + fi for PEER in `ls /etc/peer2anonet/peers`; do mkdir -p /services/"$PEER" -- cgit v1.2.3 From 978c17f470d93712dbe42b81bf4311ac163199a8 Mon Sep 17 00:00:00 2001 From: d3v11 Date: Wed, 21 Dec 2011 00:21:18 +0000 Subject: forced exit 1 for --configure-dns if someone didn't configure their tinydns data first. --- contrib/peer2anonet/peer2anonet | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 4895df2..715f507 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -413,14 +413,14 @@ CONFIGURE_DNS(){ ) echo -e '\nCONFIGURE DNS:\n' - NICK=`cat conf/git_name` - TINYDNS_ROOT_IP=`cat conf/tinydns__rootsrvrip` - TINYDNS_ROOT_DOMAIN=`cat conf/tinydns__rootsrvrname` - TINYDNS_ANO_IP=`cat conf/tinydns__tldsrvrip` - TINYDNS_ANO_DOMAIN=`cat conf/tinydns__tldsrvrname` - TINYDNS_IP=`cat conf/tinydns__srvrip` - TINYDNS_DOMAIN=`cat conf/tinydns__srvrname` - GIT_IP=`cat conf/gitd_ip` + NICK=`cat conf/git_name` || exit 1 + TINYDNS_ROOT_IP=`cat conf/tinydns__rootsrvrip` || exit 1 + TINYDNS_ROOT_DOMAIN=`cat conf/tinydns__rootsrvrname` || exit 1 + TINYDNS_ANO_IP=`cat conf/tinydns__tldsrvrip` || exit 1 + TINYDNS_ANO_DOMAIN=`cat conf/tinydns__tldsrvrname` || exit 1 + TINYDNS_IP=`cat conf/tinydns__srvrip` || exit 1 + TINYDNS_DOMAIN=`cat conf/tinydns__srvrname` || exit 1 + GIT_IP=`cat conf/gitd_ip` || exit 1 GIT_DOMAIN="git.$NICK.ano" ip addr add $TINYDNS_ROOT_IP/32 dev lo > /dev/null 2>&1 -- cgit v1.2.3