fix messages that say dsh instead of xdsh

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2475 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-11-07 16:37:05 +00:00
parent 8215daea46
commit 361e110c76
2 changed files with 14 additions and 24 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env perl
#!/usr/bin/enr perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
package xCAT::DSHCLI;
@ -2523,7 +2523,7 @@ sub handle_signal_dsh
{
$rsp->{data}->[0] =
"dsh> Remote_command_cancelled $user_target";
"xdsh> Remote_command_cancelled $user_target";
$$dsh_options{'monitor'}
&& xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
}
@ -2581,7 +2581,7 @@ sub handle_signal_dsh
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
$rsp->{data}->[0] =
"dsh> Remote_command_cancelled $user_target";
"xdsh> Remote_command_cancelled $user_target";
$$dsh_options{'monitor'}
&& xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
}
@ -2604,7 +2604,7 @@ sub handle_signal_dsh
$dsh_stats{'canceled-targets'} = $dsh_target_status{'canceled'};
}
$rsp->{data}->[0] = "dsh> Dsh_remote_execution_completed";
$rsp->{data}->[0] = "xdsh> Dsh_remote_execution_completed";
$$dsh_options{'monitor'}
&& xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
@ -3713,7 +3713,7 @@ sub parse_and_run_dsh
@results = xCAT::DSHCLI->runlocal_on_rootimg(\%options, $imagename);
if ($::RUNCMD_RC)
{ # error from dsh
$rsp->{data}->[0] = "Error from dsh. Return Code = $::RUNCMD_RC";
$rsp->{data}->[0] = "Error from xdsh. Return Code = $::RUNCMD_RC";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
}
@ -3726,7 +3726,7 @@ sub parse_and_run_dsh
@results = xCAT::DSHCLI->runDsh_api(\%options, 0);
if ($::RUNCMD_RC)
{ # error from dsh
$rsp->{data}->[0] = "Error from dsh. Return Code = $::RUNCMD_RC";
$rsp->{data}->[0] = "Error from xdsh. Return Code = $::RUNCMD_RC";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
}
@ -3970,7 +3970,7 @@ sub parse_and_run_dcp
if ($::RUNCMD_RC)
{ # error from dcp
my $rsp={};
$rsp->{data}->[0] = "Error from dsh. Return Code = $::RUNCMD_RC";
$rsp->{data}->[0] = "Error from xdsh. Return Code = $::RUNCMD_RC";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
}
@ -4059,7 +4059,7 @@ sub parse_input_file
node.
Arguments:
$optionRef:
Specifies a hash in which the dsh options are provided
Specifies a hash in which the xdsh options are provided
$exitCode:
reference to an array for efficiency.
Example:
@ -4186,7 +4186,7 @@ sub runDsh_api
{
xCAT::MsgUtils->message(
"E",
"dsh command: $$optionsRef{'command'} failed on nodes:$::DSH_API_NODES_FAILED."
"xdsh command: $$optionsRef{'command'} failed on nodes:$::DSH_API_NODES_FAILED."
);
}
}

View File

@ -1455,26 +1455,16 @@ sub storeresults
system("/bin/rm $newtempfile");
# capture errors
# open errorfile to write results of xdsh or rinv command
#
if (@errresult)
{ # if errors
my $newtempfile = $tempfile;
$newtempfile .= "err";
open(FILE, ">$newtempfile");
if ($? > 0)
{
my $rsp = {};
$rsp->{data}->[0] = "Could not open $newtempfile\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
my $rsp = {};
my $i=0;
foreach my $line (@errresult)
{
print FILE $line;
$rsp->{data}->[$i] = $line;
$i++;
}
close FILE;
my $rsp = {};
$rsp->{data}->[0] = "\nCheck $newtempfile for errors.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}