changeset 829:3750fcc21c33 draft

updates to peer2anonet, added "static bird"
author d3v11 <d3v11@d3v11.ano>
date Wed, 21 Dec 2011 00:10:44 +0000
parents c76e4877f972
children 8b706576b3f4 fd59bad51e25
files contrib/peer2anonet/README.html contrib/peer2anonet/peer2anonet
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/README.html	Mon Dec 19 04:17:04 2011 +0000
+++ b/contrib/peer2anonet/README.html	Wed Dec 21 00:10:44 2011 +0000
@@ -93,6 +93,10 @@
 
             <b>CONFIGURATION FILES:</b>
 
+                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
--- a/contrib/peer2anonet/peer2anonet	Mon Dec 19 04:17:04 2011 +0000
+++ b/contrib/peer2anonet/peer2anonet	Wed Dec 21 00:10:44 2011 +0000
@@ -142,7 +142,10 @@
 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 @@
  interface \"eth0\";
  import filter only_AnoNet;
 }" > /services/bird/bird.conf
+    fi
 
     for PEER in `ls /etc/peer2anonet/peers`; do
         mkdir -p /services/"$PEER"