repo: resdb
action: commit
revision: 
path_from: 
revision_from: 660160694efdc857930957acb05f7b73ce3898d1:
path_to: 
revision_to: 
git.thebackupbox.net
resdb
git clone git://git.thebackupbox.net/resdb
commit 660160694efdc857930957acb05f7b73ce3898d1
Author: d3v11 
Date:   Sun Jan 15 02:49:46 2012 +0000

    changed peer2anonet to support "slackware", nick please confirm
    new code will work. if not i am happy to create fix

diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
index f1ab538212988a18fd5da28ddfc89ee84b340750..
index ..1917bc2d6d6a70c45d232b78de13b2b189006f5c 100755
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -337,8 +337,16 @@ INSTALL_DAEMONTOOLS(){
     cd admin/daemontools-0.76
     sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc
     package/install
-    cp /etc/rc.local /etc/peer2anonet/rc.local.backup
-    sed -i "s/exit 0/csh -cf \'\/command\/svscanboot \&\'/" /etc/rc.local
+    if [ -e /etc/rc.d/rc.local ]; then
+        sed -i "s/exit 0/csh -cf \'\/command\/svscanboot \&\'/" /etc/rc.d/rc.local
+        chmod +x /etc/rc.d/rc.local
+    elif [ -e /etc/rc.local ]; then
+        sed -i "s/exit 0/csh -cf \'\/command\/svscanboot \&\'/" /etc/rc.local
+        chmod +x /etc/rc.local
+    else
+        echo '   fatal error: cannot find rc startup script'
+        exit 1
+    fi
     chmod +x /etc/rc.local
     }

-----END OF PAGE-----