summaryrefslogtreecommitdiffstats
path: root/stap-find-or-start-server
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
commitc8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (patch)
treeab2388afb795ed1a7ead2fbbf8b9d1b368a8231f /stap-find-or-start-server
parentdd9a3bcbef65bde65491d959e9458bc641924811 (diff)
parent3863e7999255deeaa7f8f4bba7df893773812537 (diff)
downloadsystemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.gz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.xz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/print.c runtime/transport/transport.c runtime/transport/transport_msgs.h
Diffstat (limited to 'stap-find-or-start-server')
-rwxr-xr-xstap-find-or-start-server18
1 files changed, 8 insertions, 10 deletions
diff --git a/stap-find-or-start-server b/stap-find-or-start-server
index 97e7caca..a93b21fe 100755
--- a/stap-find-or-start-server
+++ b/stap-find-or-start-server
@@ -10,23 +10,21 @@
# later version.
# This script attempts to find a systemtap server. If one is found, it
-# echoes 0 and exits with 0.
+# echoes 0.
#
# Otherwise, it attempts to start a server. If succesful, it echoes the
-# process id and exits with 0.
+# process id.
#
-# Otherwise, it echoes -1 and exits with 1
+# Otherwise, it echoes -1
-# INSTALL-HOOK These settings work for running the client from the source tree
-# INSTALL-HOOK using the dejagnu test harness and will be overridden at install
-# INSTALL-HOOK time.
-exec_prefix=
+# Initialize the environment
+. `dirname $0`/stap-env
# Is there a server available?
-${exec_prefix}stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0
+${stap_exec_prefix}stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0
# No server available, try to start one.
-pid=`${exec_prefix}stap-start-server "$@"`
+pid=`${stap_exec_prefix}stap-start-server "$@"`
if test $? = 0; then
echo $pid
exit 0
@@ -34,4 +32,4 @@ fi
# Could not find or start a server
echo "-1"
-exit 1
+exit 0