diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
commit | 69ce6c79dbcb2cec2d1245935ef20bf832ffe70a (patch) | |
tree | 0b6aea71ef4f3ca5c797494d062819bfba63e7f7 /stap-client | |
parent | 72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac (diff) | |
parent | 0ee3adb42f2f6d8bffe177e77a415b3a74f3a777 (diff) | |
download | systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.gz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.xz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'stap-client')
-rwxr-xr-x | stap-client | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stap-client b/stap-client index 189742cb..fa11fef0 100755 --- a/stap-client +++ b/stap-client @@ -22,7 +22,7 @@ trap 'interrupt' SIGINT trap 'ignore_signal' SIGHUP SIGPIPE # Initialize the environment -. `dirname $0`/stap-env +. ${PKGLIBEXECDIR}stap-env #----------------------------------------------------------------------------- # Helper functions. @@ -634,22 +634,22 @@ function find_and_connect_to_server { fi fi - if test `${stap_exec_prefix}stap-find-servers $find_all | grep $address | wc -l` = "0"; then + if test `${stap_pkglibexecdir}stap-find-servers $find_all | grep $address | wc -l` = "0"; then warning "No server is available on $server" 2>> $tmpdir_client/connect continue fi - ssl_db=`${stap_exec_prefix}stap-find-servers $find_all | grep $address | choose_server` + ssl_db=`${stap_pkglibexecdir}stap-find-servers $find_all | grep $address | choose_server` test "X$ssl_db" != "X" && return done else # No servers specified. Find available servers and choose one of them. # Remember which ssl certificate database was used to authenticate the chosen # server. - ssl_db=`${stap_exec_prefix}stap-find-servers $find_all | choose_server` + ssl_db=`${stap_pkglibexecdir}stap-find-servers $find_all | choose_server` test "X$ssl_db" != "X" && return - num_servers=`${stap_exec_prefix}stap-find-servers $find_all | wc -l` + num_servers=`${stap_pkglibexecdir}stap-find-servers $find_all | wc -l` fi if test $num_servers = 0; then @@ -723,8 +723,8 @@ function send_receive { do # Send the request and receive the response using stap-client-connect echo "Attempting connection with $server:$port using certificate database in '$db'" >> $tmpdir_client/connect - ${stap_exec_prefix}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & - wait '%${stap_exec_prefix}stap-client-connect' + ${stap_pkglibexecdir}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & + wait '%${stap_pkglibexecdir}stap-client-connect' test $? = 0 && echo $db && return sleep 1 done @@ -734,8 +734,8 @@ function send_receive { do # Send the request and receive the response using stap-client-connect echo "Attempting connection with $server:$port using certificate database in '$db'" >> $tmpdir_client/connect - ${stap_exec_prefix}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & - wait '%${stap_exec_prefix}stap-client-connect' + ${stap_pkglibexecdir}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & + wait '%${stap_pkglibexecdir}stap-client-connect' test $? = 0 && echo $db && return sleep 1 done @@ -1066,7 +1066,7 @@ function terminate { kill -s SIGTERM '%?staprun' 2>/dev/null # Kill any stap-client-connect job - kill -s SIGTERM '%${stap_exec_prefix}stap-client-connect' 2>/dev/null + kill -s SIGTERM '%${stap_pkglibexecdir}stap-client-connect' 2>/dev/null exit 1 } @@ -1077,7 +1077,7 @@ function terminate { function interrupt { # Kill any stap-client-connect job # SIGINT won't do it. - kill -s SIGTERM '%${stap_exec_prefix}stap-client-connect' 2>/dev/null + kill -s SIGTERM '%${stap_pkglibexecdir}stap-client-connect' 2>/dev/null # If staprun was not running, then exit. cleanup |