summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authord3v11 <d3v11@d3v11.ano>2012-10-29 04:39:39 +0000
committerd3v11 <d3v11@d3v11.ano>2012-10-29 04:39:39 +0000
commit71594f7359f6a612dd078ff65919cc2e27fe1474 (patch)
treedf5701c172b2c0ec1c652a08c9971a42d6e86228
parent578a9a127c419df413f799e5be892743564a20a6 (diff)
downloadresdb-71594f7359f6a612dd078ff65919cc2e27fe1474.tar.gz
resdb-71594f7359f6a612dd078ff65919cc2e27fe1474.zip
[peer2anonet] ip addr add (thanks talamon)
-rwxr-xr-xcontrib/peer2anonet/peer2anonet15
1 files 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