diff options
author | d3v11 <d3v11@d3v11.ano> | 2012-01-15 22:09:32 +0000 |
---|---|---|
committer | d3v11 <d3v11@d3v11.ano> | 2012-01-15 22:09:32 +0000 |
commit | 2d12af923db0e2ed936c23c4e3c977fd5ee73ee4 (patch) | |
tree | 484ed9e9e4f6eeb51c8a200fa9107479f5209130 | |
parent | f3610aba6ff6d2ecc7525d0d492de5c86d7d8f9a (diff) | |
download | resdb-2d12af923db0e2ed936c23c4e3c977fd5ee73ee4.tar.gz resdb-2d12af923db0e2ed936c23c4e3c977fd5ee73ee4.zip |
slackware support for
./contrib/peer2anonet/peer2anonet --configure-dns
-rwxr-xr-x | contrib/peer2anonet/peer2anonet | 44 |
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 |