From: John L. <mov...@us...> - 2001-09-25 17:07:10
|
Update of /cvsroot/oprofile/oprofile/dae In directory usw-pr-cvs1:/tmp/cvs-serv23471/dae Modified Files: op_stop Log Message: use pidof instead Index: op_stop =================================================================== RCS file: /cvsroot/oprofile/oprofile/dae/op_stop,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- op_stop 2001/09/25 16:13:14 1.10 +++ op_stop 2001/09/25 17:07:07 1.11 @@ -16,14 +16,14 @@ # Place - Suite 330, Boston, MA 02111-1307, USA. # -PSLINE=`ps x | grep oprofiled | grep -v grep` +if test ! -f /sbin/pidof; then + echo "No /sbin/pidof found !!!!!" >&2 +fi -NAME=`echo $PSLINE | awk '{print $5}'` -if [ "$NAME" = "oprofiled" ] +if test `/sbin/pidof oprofiled` then - PID=`echo $PSLINE | awk '{print $1}'` echo "Stopping profiling and killing daemon" - kill $PID + kill `/sbin/pidof oprofiled` exit fi |