diff options
author | Dave Brolley <brolley@redhat.com> | 2008-07-08 14:22:11 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2008-07-08 14:22:11 -0400 |
commit | b7278cda1ffbe3f1e711adb40577ad12f3527260 (patch) | |
tree | 9957df6965fac4cee1d2444745029ce378e6e461 /stap-client | |
parent | ff7b8b4a8fbcba5e78e72617753fd33f6f3ebc07 (diff) | |
download | systemtap-steved-b7278cda1ffbe3f1e711adb40577ad12f3527260.tar.gz systemtap-steved-b7278cda1ffbe3f1e711adb40577ad12f3527260.tar.xz systemtap-steved-b7278cda1ffbe3f1e711adb40577ad12f3527260.zip |
Use `uname -rvm` for checking system compatibility. Generate
a finale response from the server to allow for error checking.
Diffstat (limited to 'stap-client')
-rwxr-xr-x | stap-client | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/stap-client b/stap-client index 515cab92..8c3607ae 100755 --- a/stap-client +++ b/stap-client @@ -315,7 +315,7 @@ function create_request { function client_sysinfo { if test "X$sysinfo_client" = "X"; then # Add some info from uname - sysinfo_client="`uname -r`" + sysinfo_client="`uname -rvm`" fi echo $sysinfo_client } @@ -348,7 +348,6 @@ function package_request { # the tar file will expand to. function send_request { echo "request:" >&3 - # Get the server's response. read <&3 local line=$REPLY @@ -368,7 +367,19 @@ function send_request { # function: receive_response # # Wait for a response from the server indicating the results of our request. +# protocol is: +# server -> "done:" +# server -> $tar_server function receive_response { + # Get the server's response. + read <&3 + local line=$REPLY + check_server_error $line + + # Check for the proper response. + test "$line" = "done:" || \ + fatal "ERROR: server response, '$line', is incorrect" + # Make a place to receive the response file. tar_server=`mktemp -t $tmpdir_prefix_client.server.tgz.XXXXXX` || \ fatal "ERROR: cannot create temporary file " $tar_server @@ -522,6 +533,7 @@ function match_server { # It is a stap server, but is it compatible? if test "$sysinfo_server" != "`client_sysinfo`"; then + server_ip= continue fi |