summaryrefslogtreecommitdiffstats
path: root/stap-client
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2008-09-12 15:05:38 -0400
committerDave Brolley <brolley@redhat.com>2008-09-12 15:05:38 -0400
commitd52261ec3e39326ebc7c571487f0a443903072af (patch)
tree01906c282627d337171de506cbdc7d278179da8b /stap-client
parent8807cc2bee27f6528a23a0267eb2d3e3e6dd0628 (diff)
downloadsystemtap-steved-d52261ec3e39326ebc7c571487f0a443903072af.tar.gz
systemtap-steved-d52261ec3e39326ebc7c571487f0a443903072af.tar.xz
systemtap-steved-d52261ec3e39326ebc7c571487f0a443903072af.zip
Ensure $first_stap is not empty in staprun_PATH
Diffstat (limited to 'stap-client')
-rwxr-xr-xstap-client6
1 files changed, 6 insertions, 0 deletions
diff --git a/stap-client b/stap-client
index f4ccb033..0ac9bd68 100755
--- a/stap-client
+++ b/stap-client
@@ -659,6 +659,12 @@ function staprun_PATH {
# staprun may invoke 'stap'. So we can use the current PATH if we were
# not invoked as 'stap' or we are not the first 'stap' on the PATH.
local first_stap=`which stap 2>/dev/null`
+
+ if test "X$first_stap" = "X"; then
+ echo "$PATH"
+ return
+ fi
+
if test `which $0 2>/dev/null` != $first_stap; then
echo "$PATH"
return