From 46f262270f1b4f5869466f38f87e4177fa84b5c0 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 10 Nov 2009 15:57:05 +0000 Subject: [PATCH] return error returns even though no messages git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4539 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/xdsh.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xdsh.pm b/xCAT-server/lib/xcat/plugins/xdsh.pm index 2ad0c56c4..256b1e69b 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -333,8 +333,8 @@ sub xdsh { my ($nodes, $args, $callback, $command, $noderange) = @_; - - # parse dsh input + $::FAILED_NODES=0; + # parse dsh input, will return $::NUMBER_NODES_FAILED my @local_results = xCAT::DSHCLI->parse_and_run_dsh($nodes, $args, $callback, $command, $noderange); @@ -357,7 +357,11 @@ sub xdsh } xCAT::MsgUtils->message("D", $rsp, $callback); } - return; + # set return code + $rsp = {}; + $rsp->{errorcode}= $::FAILED_NODES; + $callback->($rsp); + return(); } #-------------------------------------------------------