summaryrefslogtreecommitdiffstats
path: root/stap-client
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2008-07-30 12:39:51 -0400
committerDave Brolley <brolley@redhat.com>2008-07-30 12:39:51 -0400
commit161be0d9d13449d74de97327786dde83da24bd86 (patch)
tree186a633cf23317fedce9fd646038a49fbf0ba7e4 /stap-client
parente59868d97dbe9b28ea2f3730252c38a582b19a0f (diff)
downloadsystemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.tar.gz
systemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.tar.xz
systemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.zip
No need for random suffix file cmdline and sysinfo files in the
client's request tree.
Diffstat (limited to 'stap-client')
-rwxr-xr-xstap-client16
1 files changed, 5 insertions, 11 deletions
diff --git a/stap-client b/stap-client
index 033ef4b3..d6bb8442 100755
--- a/stap-client
+++ b/stap-client
@@ -296,22 +296,16 @@ function create_request {
if test "X$script_file" != "X"; then
if test "$script_file" = "-"; then
mkdir -p $tmpdir_client/script || \
- fatal "ERROR: cannot create temporary diectory " $tmpdir_client/script
+ fatal "ERROR: cannot create temporary directory " $tmpdir_client/script
cat > $tmpdir_client/script/$script_file
else
include_file_or_directory script $script_file > /dev/null
fi
fi
- # Add the necessary info to special files in our temporary directory. Do this
- # after linking in -I and -R directories in order to guarantee no name clashes.
- tmpfile=`mktemp cmdline.XXXXXX` || \
- fatal "ERROR: cannot create temporary file "
- echo "cmdline: $cmdline" > $tmpfile
-
- tmpfile=`mktemp sysinfo.XXXXXX` || \
- fatal "ERROR: cannot create temporary file " $tmpfile
- echo "sysinfo: `client_sysinfo`" > $tmpfile
+ # Add the necessary info to special files in our temporary directory.
+ echo "cmdline: $cmdline" > cmdline
+ echo "sysinfo: `client_sysinfo`" > sysinfo
}
# function client_sysinfo
@@ -467,9 +461,9 @@ function unpack_response {
#
# Find and establish connection with a compatible stap server.
function find_and_connect_to_server {
- cd $tmpdir_client
# Use a temp file here instead of a pipeline so that the side effects
# of choose_server are seen by the rest of this script.
+ cd $tmpdir_client
stap-find-servers > servers
choose_server < servers
rm -fr servers