summaryrefslogtreecommitdiff
path: root/contrib/peer2anonet
diff options
context:
space:
mode:
authord3v11 <d3v11@d3v11.ano>2012-01-15 22:09:32 +0000
committerd3v11 <d3v11@d3v11.ano>2012-01-15 22:09:32 +0000
commit2d12af923db0e2ed936c23c4e3c977fd5ee73ee4 (patch)
tree484ed9e9e4f6eeb51c8a200fa9107479f5209130 /contrib/peer2anonet
parentf3610aba6ff6d2ecc7525d0d492de5c86d7d8f9a (diff)
downloadresdb-2d12af923db0e2ed936c23c4e3c977fd5ee73ee4.tar.gz
resdb-2d12af923db0e2ed936c23c4e3c977fd5ee73ee4.zip
slackware support for
./contrib/peer2anonet/peer2anonet --configure-dns
Diffstat (limited to 'contrib/peer2anonet')
-rwxr-xr-xcontrib/peer2anonet/peer2anonet44
1 files changed, 31 insertions, 13 deletions
diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
index b087aa3..d699287 100755
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -435,24 +435,42 @@ CONFIGURE_DNS(){
GIT_IP=`cat conf/gitd_ip` || exit 1
GIT_DOMAIN="git.$NICK.ano"
+ if [ -w /etc/rc.local ]; then
+ if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local
+ fi
+ if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local
+ fi
+ if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local
+ fi
+ if [[ $(cat /etc/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local
+ fi
+ elif [ -w /etc/rc.d/rc.local ]; then
+ if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.d/rc.local
+ fi
+ if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.d/rc.local
+ fi
+ if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then
+ echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.d/rc.local
+ fi
+ if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then
+ 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
+ fi
+
ip addr add $TINYDNS_ROOT_IP/32 dev lo > /dev/null 2>&1
ip addr add $TINYDNS_IP/32 dev lo > /dev/null 2>&1
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
- if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then
- echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local
- fi
- if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then
- echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local
- fi
- if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then
- echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local
- fi
- if [[ $(cat /etc/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then
- echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local
- fi
-
useradd Gdnscache
useradd Gdnslog
useradd Gtinydns