path: boinc_8.2.8+dfsg-1/checkin_notes_2008 Eric K April 14 2008 - Unix init script: modified to make less linux specific. - Does not presume the existence of "pidof" or "runuser". - If started with an old style Bourne shell, will try to restart in bash, zsh or ksh. path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in # check if we have pidof. If not use ps and grep for the same job. if [ -x /sbin/pidof ] ; then function local_pidof() { pidof -s -x -o $$ -o $PPID -o %PPID $1 path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in if [ -x /sbin/pidof ] ; then function local_pidof() { pidof -s -x -o $$ -o $PPID -o %PPID $1 } else path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in fi if [ "$PID" == "" ]; then PID=`local_pidof $BOINCEXE_NAME` fi if [ "$PID" == "" ]; then path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in fi # check if we have pidof. If not use ps and grep for the same job. if [ -x /sbin/pidof ] ; then function local_pidof() { path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in function echo_warning () { $printcol "[WARNING]" ; } function killproc() { PID=`local_pidof $1` [ $PID ] && kill $PID } path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in fi sleep 3 PID=`local_pidof $BOINCEXE_NAME` if [ $PID ]; then echo $PID > $PIDFILE path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in } else function local_pidof() { ${PS} xaugww | sed 's/$/ /' | grep "[ /]$1 " | grep -v $$ | grep -v $PPID | grep -v %PPID | grep -v grep | awk '{print $2}' | head -1 } path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in # check if we have pidof. If not use ps and grep for the same job. if [ -x /sbin/pidof ] ; then function local_pidof() { pidof -s -x -o $$ -o $PPID -o %PPID $1 } path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in fi if [ "$PID" == "" ]; then PID=`local_pidof $BOINCEXE` fi if [ "$PID" != "" ]; then path: boinc_8.2.8+dfsg-1/client/scripts/boinc-client.in start) cd $BOINCDIR PID=`local_pidof $BOINCEXE_NAME` if [ -f lockfile -o -f $LOCKFILE ] ; then