summaryrefslogtreecommitdiffstats
path: root/stap-find-or-start-server
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-01-13 16:19:53 -0500
committerDave Brolley <brolley@redhat.com>2009-01-13 16:19:53 -0500
commit21325e0c78f4de1e772813c8f071d909d83e1b58 (patch)
treef37745871b66343986890725829fb8df5f7b4fee /stap-find-or-start-server
parent790c4dd6eff3fbc127b67e23478d7edc6bf1cd08 (diff)
downloadsystemtap-steved-21325e0c78f4de1e772813c8f071d909d83e1b58.tar.gz
systemtap-steved-21325e0c78f4de1e772813c8f071d909d83e1b58.tar.xz
systemtap-steved-21325e0c78f4de1e772813c8f071d909d83e1b58.zip
Ensure that the client/server scripts call the installed copies of any
other systemtap tools.
Diffstat (limited to 'stap-find-or-start-server')
-rwxr-xr-xstap-find-or-start-server10
1 files changed, 7 insertions, 3 deletions
diff --git a/stap-find-or-start-server b/stap-find-or-start-server
index beef05fc..efe23558 100755
--- a/stap-find-or-start-server
+++ b/stap-find-or-start-server
@@ -2,7 +2,7 @@
# Find or start a systemtap server
#
-# Copyright (C) 2008 Red Hat Inc.
+# Copyright (C) 2008, 2009 Red Hat Inc.
#
# This file is part of systemtap, and is free software. You can
# redistribute it and/or modify it under the terms of the GNU General
@@ -17,11 +17,15 @@
#
# Otherwise, it echoes -1 and exits with 1
+# Where are we installed?
+exec_prefix=`dirname $0`
+exec_prefix=`cd $exec_prefix && pwd`
+
# Is there a server available?
-stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0
+$exec_prefix/stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0
# No server available, try to start one.
-pid=`stap-start-server "$@"`
+pid=`$exec_prefix/stap-start-server "$@"`
if test $? = 0; then
echo $pid
exit 0