From 161be0d9d13449d74de97327786dde83da24bd86 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Wed, 30 Jul 2008 12:39:51 -0400 Subject: No need for random suffix file cmdline and sysinfo files in the client's request tree. --- stap-client | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'stap-client') 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 -- cgit