changeset 1042:b211722679fb draft

[peer2anonet] fck gentoo
author d3v11 <d3v11@d3v11.ano>
date Mon, 29 Oct 2012 04:50:41 +0000
parents 7d7befd08968
children ae67d952429a
files contrib/peer2anonet/peer2anonet
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/peer2anonet	Mon Oct 29 04:39:39 2012 +0000
+++ b/contrib/peer2anonet/peer2anonet	Mon Oct 29 04:50:41 2012 +0000
@@ -431,8 +431,14 @@
             echo "ip addr add $MX_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/qmail-ips
+          echo "#!/bin/sh -e" > /services/qmail-ips/run
+          echo "ip addr add $MX_IP/32 dev lo &" >> /services/qmail-ips/run
+          echo "svc -d ." /services/qmail-ips/run
+          chmod +x /services/qmail-ips/run
+          test -L /service/qmail-ips || ln -s /services/qmail-ips /service/qmail-ips
+        )
     fi
 
     ip addr add $MX_IP/32 dev lo > /dev/null 2>&1
@@ -623,17 +629,17 @@
     ip addr add $TINYDNS_ANO_IP/32 dev lo > /dev/null 2>&1
     ip addr add $GIT_IP/32 dev lo > /dev/null 2>&1
 
-    useradd Gdnscache
-    useradd Gdnslog
-    useradd Gtinydns
+    useradd gdnscache
+    useradd gdnslog
+    useradd gtinydns
 
-    dnscache-conf Gdnscache Gdnslog /services/dnscache
+    dnscache-conf gdnscache gdnslog /services/dnscache
     mv /services/dnscache/root/servers/@ /services/dnscache/root/servers/@.icann
     echo $TINYDNS_ROOT_IP >/services/dnscache/root/servers/@
     echo 'nameserver 127.0.0.1' >/etc/resolv.conf
 
 
-    tinydns-conf Gtinydns Gdnslog /services/tinydns $TINYDNS_IP
+    tinydns-conf gtinydns gdnslog /services/tinydns $TINYDNS_IP
     (
         cd /services/tinydns/root
         ./add-ns $NICK.ano $TINYDNS_IP
@@ -643,11 +649,11 @@
         make
     )
 
-    tinydns-conf Gtinydns Gdnslog /services/tinydns-root $TINYDNS_ROOT_IP
+    tinydns-conf gtinydns gdnslog /services/tinydns-root $TINYDNS_ROOT_IP
     ./scripts/nameserver_autogen/tinydns_root_datafile > /services/tinydns-root/root/data
     ( cd /services/tinydns-root/root ; make )
 
-    tinydns-conf Gtinydns Gdnslog /services/tinydns-ano $TINYDNS_ANO_IP
+    tinydns-conf gtinydns gdnslog /services/tinydns-ano $TINYDNS_ANO_IP
     ./scripts/nameserver_autogen/tinydns_tld_datafile > /services/tinydns-ano/root/data
     ( cd /services/tinydns-ano/root ; make )