changeset 781:f9c3f2b6a6b1 draft

patched peer2anonet bootstrap bug
author d3v11 <d3v11@d3v11.ano>
date Sat, 26 Nov 2011 20:06:20 +0000
parents 49208db8c8f2
children 072f9a381c63
files contrib/peer2anonet/peer2anonet
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/peer2anonet	Sat Nov 26 19:04:16 2011 +0000
+++ b/contrib/peer2anonet/peer2anonet	Sat Nov 26 20:06:20 2011 +0000
@@ -30,13 +30,6 @@
 mkdir -p /etc/peer2anonet
 mkdir -p /etc/peer2anonet/peers
 
-if [ -e /etc/peer2anonet/p2a.conf ]; then
-    source /etc/peer2anonet/p2a.conf
-else
-    echo "peer2anonet: needs --configure prior to usage"
-    exit 1
-fi
-
 CONFIGURE(){
     echo -e '\nCONFIGURE:\n'
     read -p "   Enter your AnoNet subnet: " P2A_NET
@@ -397,6 +390,13 @@
     ( cd /service ; svc -t dnscache tinydns* )    
     }
 
+if [ -e /etc/peer2anonet/p2a.conf ]; then
+    source /etc/peer2anonet/p2a.conf
+else
+    CONFIGURE
+    exit 0
+fi
+
 
 if [ "$1" == '--configure' ]; then
     CONFIGURE