From 71594f7359f6a612dd078ff65919cc2e27fe1474 Mon Sep 17 00:00:00 2001 From: d3v11 Date: Mon, 29 Oct 2012 04:39:39 +0000 Subject: [peer2anonet] ip addr add (thanks talamon) --- contrib/peer2anonet/peer2anonet | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 25e2e6b..340c3c2 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -559,7 +559,7 @@ CONFIGURE_DNS(){ ( cd /service - svc -d dnscache tinydns tinydns-ano tinydns-root + svc -d dnscache tinydns tinydns-ano tinydns-root >/dev/null 2>&1 rm -f dnscache tinydns tinydns-ano tinydns-root cd /services rm -rf dnscache tinydns tinydns-ano tinydns-root @@ -605,8 +605,17 @@ CONFIGURE_DNS(){ echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.d/rc.local fi else - echo " fatal error: cannot reliably assign ip's to startup" - exit 1 + ( + mkdir -p /services/tinydns-ips + echo "#!/bin/sh -e" > /services/tinydns-ips/run + echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /services/tinydns-ips/run + echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /services/tinydns-ips/run + echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /services/tinydns-ips/run + echo "ip addr add $GIT_IP/32 dev lo &" >> /services/tinydns-ips/run + echo "svc -d ." /services/tinydns-ips/run + chmod +x /services/tinydns-ips/run + test -L /service/tinydns-ips || ln -s /services/tinydns-ips /service/tinydns-ips + ) fi ip addr add $TINYDNS_ROOT_IP/32 dev lo > /dev/null 2>&1 -- cgit v1.2.3