repo: resdb
action: commit
revision: 
path_from: 
revision_from: c861158c8cd34972db168c2c06ce63ba6072b30e:
path_to: 
revision_to: 
git.thebackupbox.net
resdb
git clone git://git.thebackupbox.net/resdb
commit c861158c8cd34972db168c2c06ce63ba6072b30e
Author: d3v11 
Date:   Wed Dec 21 00:10:44 2011 +0000

    updates to peer2anonet, added "static bird"

diff --git a/contrib/peer2anonet/README.html b/contrib/peer2anonet/README.html
index 6866354c1405bd38621fcc961d1cf9254304b1ab..
index ..52c732bd864a8801e9b022e6f08a3ea74a834dea 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 152f4a406361479a4c60eaacd24e2549952f60d5..
index ..4895df28cddbafa484f65275efc7dd5081717a8a 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"

-----END OF PAGE-----