diff options
Diffstat (limited to 'stap-find-or-start-server')
-rwxr-xr-x | stap-find-or-start-server | 10 |
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 |