diff options
author | Dave Brolley <brolley@redhat.com> | 2009-05-04 16:05:22 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-05-04 16:05:22 -0400 |
commit | 2035bcd40b17832439df0a1eb28403b99a71b74f (patch) | |
tree | 0fb027ba40f34513279f2e39e1110b50a415d2c1 /stap-server | |
parent | 3ba2eb82cafa938c1c3f7ef9d2da06912a49d8e0 (diff) | |
download | systemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.tar.gz systemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.tar.xz systemtap-steved-2035bcd40b17832439df0a1eb28403b99a71b74f.zip |
Module signing and verification using a separate file for the module signature.
Diffstat (limited to 'stap-server')
-rwxr-xr-x | stap-server | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/stap-server b/stap-server index ec827a09..316cc954 100755 --- a/stap-server +++ b/stap-server @@ -16,22 +16,12 @@ # Catch ctrl-c and other termination signals trap 'terminate' SIGTERM SIGINT +# Initialize the environment +. `dirname $0`/stap-env + #----------------------------------------------------------------------------- # Helper functions. #----------------------------------------------------------------------------- -# function: configuration -function configuration { - # 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= - sysconfdir=`pwd`/net - - # Configuration - tmpdir_prefix_client=stap.client - tmpdir_prefix_server=stap.server -} - # function: initialization function initialization { # Initialization @@ -92,18 +82,18 @@ function unpack_request { fatal "Cannot unpack zip archive $zip_client" # Identify the client's request tree. The zip file should have expanded - # into a single directory named to match $tmpdir_prefix_client.?????? + # into a single directory named to match $stap_tmpdir_prefix_client.?????? # which should now be the only item in the current directory. test "`ls | wc -l`" = 3 || \ fatal "Wrong number of files after expansion of client's zip file" - tmpdir_client=`ls | grep $tmpdir_prefix_client.......\$` + tmpdir_client=`ls | grep $stap_tmpdir_prefix_client.......\$` test "X$tmpdir_client" != "X" || \ fatal "Client zip file did not expand as expected" # Move the client's temp directory to a local temp location - local local_tmpdir_client=`mktemp -dt $tmpdir_prefix_server.client.XXXXXX` || \ + local local_tmpdir_client=`mktemp -dt $stap_tmpdir_prefix_server.client.XXXXXX` || \ fatal "Cannot create temporary client request directory " $local_tmpdir_client mv $tmpdir_client/* $local_tmpdir_client rm -fr $tmpdir_client @@ -340,7 +330,7 @@ function call_stap { server_p_phase=$p_phase fi - eval ${exec_prefix}stap "$cmdline" -k -p $server_p_phase \ + eval ${stap_exec_prefix}stap "$cmdline" -k -p $server_p_phase \ >> $tmpdir_server/stdout \ 2>> $tmpdir_server/stderr @@ -433,7 +423,6 @@ function terminate { #----------------------------------------------------------------------------- # Beginning of main line execution. #----------------------------------------------------------------------------- -configuration initialization "$@" unpack_request check_request |