Author: pluto                        Date: Mon Aug  1 13:25:21 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix lockfile location.

---- Files affected:
SOURCES:
   oprofile-lock.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/oprofile-lock.patch
diff -u /dev/null SOURCES/oprofile-lock.patch:1.1
--- /dev/null   Mon Aug  1 15:25:21 2005
+++ SOURCES/oprofile-lock.patch Mon Aug  1 15:25:16 2005
@@ -0,0 +1,49 @@
+--- oprofile-0.9.1/utils/opcontrol.orig        2005-06-16 21:12:07.000000000 
+0200
++++ oprofile-0.9.1/utils/opcontrol     2005-08-01 15:23:21.654597008 +0200
+@@ -217,7 +217,7 @@
+ {
+       # as in op_user.h
+       DIR="/var/lib/oprofile"
+-      LOCK_FILE="/var/lib/oprofile/lock"
++      LOCK_FILE="/var/lock/oprofile.lock"
+       LOG_FILE="$DIR/oprofiled.log"
+       SAMPLES_DIR="$DIR/samples"
+       CURRENT_SAMPLES_DIR=${SAMPLES_DIR}/current
+@@ -850,7 +850,7 @@
+       done
+ 
+       # already removed unless we forced the kill
+-      rm -f /var/lib/oprofile/lock
++      rm -f $LOCK_FILE
+ }
+ 
+ 
+@@ -1097,7 +1097,7 @@
+       $OPROFILED $OPD_ARGS
+  
+       COUNT=0
+-      while ! test -f "$DIR/lock"
++      while ! test -f "$LOCK_FILE"
+       do
+               sleep 1
+               COUNT=`expr $COUNT + 1`
+@@ -1125,7 +1125,7 @@
+ # print status
+ do_status()
+ {
+-      OPROFILED_PID=`cat $DIR/lock 2>/dev/null`
++      OPROFILED_PID=`cat $LOCK_FILE 2>/dev/null`
+       if test -n "$OPROFILED_PID" -a -d "/proc/$OPROFILED_PID"; then
+               echo "Daemon running: pid $OPROFILED_PID"
+       else
+@@ -1190,8 +1190,8 @@
+ do_dump_data()
+ {
+       # make sure that the daemon is not dead and gone
+-      if test -e "$DIR/lock"; then
+-              OPROFILED_PID=`cat $DIR/lock`
++      if test -e "$LOCK_FILE"; then
++              OPROFILED_PID=`cat $LOCK_FILE`
+               if test ! -d "/proc/$OPROFILED_PID"; then
+                       echo "dump fail: daemon died during last run ?" >&2
+                       return 1;
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to