[PATCH 1/2] kernel-shark: Execute kshark-record from same dir as kshark-su-record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

Do not trust the PATH environment variable (and in fact that may not even be
available with the pkexec). Instead, use the same path as kshark-su-record
to find kshark-record. They should always be together anyway.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 kernel-shark/bin/kshark-su-record | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index 2477045f1710..7faff1cb3339 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -5,4 +5,5 @@ then
     xhost +si:localuser:root &>/dev/null
 fi
 
-pkexec kshark-record -o ${PWD}/trace.dat
+THIS_DIR=`dirname $0`
+pkexec ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
-- 
2.20.1





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux