# HG changeset patch # User d3v11 # Date 1326615718 0 # Node ID e26b88d9df75266615ae2b076a1ccb8cdb5eedd0 # Parent 07a08fc376887116c7d1a6971a6304a0eb4ff3b1 bugfixes diff -r 07a08fc37688 -r e26b88d9df75 contrib/peer2anonet/peer2anonet --- a/contrib/peer2anonet/peer2anonet Sun Jan 15 03:06:31 2012 +0000 +++ b/contrib/peer2anonet/peer2anonet Sun Jan 15 08:21:58 2012 +0000 @@ -328,6 +328,16 @@ [[ $(echo X`which make`) == X ]] && exit 1 [[ $(echo X`which csh`) == X ]] && echo ' fatal error: cannot find csh' [[ $(echo X`which csh`) == X ]] && exit 1 + + if [ -w /etc/inittab ]; then : + elif [ -w /etc/rc.local ] && ! [ -w /etc/inittab ]; then + sed -i "s/exit 0/csh -cf \'\/command\/svscanboot \&\'/" /etc/rc.local + chmod +x /etc/rc.local + else + echo ' fatal error: cannot create reliable startup' + exit 1 + fi + mkdir -p /package chmod 1755 /package cd /package @@ -338,16 +348,6 @@ cd admin/daemontools-0.76 sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc package/install - 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 } INSTALL_UCSPI_TCP(){