changeset 879:b9f1ea99d2cc draft

changed peer2anonet to support "slackware", nick please confirm new code will work. if not i am happy to create fix
author d3v11 <d3v11@d3v11.ano>
date Sun, 15 Jan 2012 02:49:46 +0000
parents 1fecd121452d
children 4e647a026cb3
files contrib/peer2anonet/peer2anonet
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/peer2anonet	Fri Jan 13 23:19:29 2012 +0000
+++ b/contrib/peer2anonet/peer2anonet	Sun Jan 15 02:49:46 2012 +0000
@@ -337,8 +337,16 @@
     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
     }