From: John L. <mov...@us...> - 2002-10-01 00:32:52
|
Update of /cvsroot/oprofile/oprofile/utils In directory usw-pr-cvs1:/tmp/cvs-serv6166/utils Modified Files: op_start_25 Log Message: 2.5 daemon fixes. Index: op_start_25 =================================================================== RCS file: /cvsroot/oprofile/oprofile/utils/op_start_25,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- op_start_25 26 Sep 2002 23:59:29 -0000 1.2 +++ op_start_25 1 Oct 2002 00:32:49 -0000 1.3 @@ -362,7 +362,6 @@ if test "$?" -eq 0; then echo "oprofiled appears to be running already." >&2 echo "delete $LOCK_FILE if this is not the case." >&2 - exit 1 fi fi @@ -379,24 +378,26 @@ vecho "cpu speed (estimation) : $cpu_speed" - vecho "executing oprofiled $OPD_ARGS" - oprofiled $OPD_ARGS - - COUNT=0 - while ! test -f "$DIR/lock" - do - sleep 1 - COUNT=`expr $COUNT + 1` - if [ "$COUNT" -eq 30 ]; then - echo "Couldn't start oprofiled." >&2 - echo "Check the log file \"$LOG_FILE\" and /var/log/messages" >&2 - exit 1 - fi - done + if test ! -f $LOCK_FILE; then + vecho "executing oprofiled $OPD_ARGS" + oprofiled $OPD_ARGS + + COUNT=0 + while ! test -f "$DIR/lock" + do + sleep 1 + COUNT=`expr $COUNT + 1` + if [ "$COUNT" -eq 30 ]; then + echo "Couldn't start oprofiled." >&2 + echo "Check the log file \"$LOG_FILE\" and /var/log/messages" >&2 + exit 1 + fi + done + fi echo 1 >$MOUNT/enable - echo "Daemon started." + echo "Profiler running." } # main |