From f9b05e488b25267cf15a7a6b4fbb730555032118 Mon Sep 17 00:00:00 2001 From: nott Date: Wed, 3 Oct 2012 20:01:59 +0000 Subject: [PATCH] fixed error returns in update_spot_sw git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13946 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index c8bb0feb6..ac0773e45 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -3939,7 +3939,6 @@ sub mk_lpp_source # don't need source since the lpp dirs/file have already # been created in the location - $output = xCAT::Utils->runcmd("$lpp_cmd", -1); if ($::RUNCMD_RC != 0) { @@ -6384,7 +6383,6 @@ sub chkFSspace # # see if we need to increase the size of the fs # - my $space_needed; if ($size >= $free_space) { @@ -8964,7 +8962,6 @@ sub copyres2 my $reqsize = xCAT::Utils->runcmd("$ducmd", -1); if ($::RUNCMD_RC != 0) { - my $rsp; push @{$rsp->{data}}, "Could not run: \'$ducmd\'\n"; if ($::VERBOSE) @@ -14163,7 +14160,7 @@ sub update_spot_sw if ($rc) { #failed to update RPM - $error++; + return 1; } # remove tmp file @@ -14178,7 +14175,7 @@ sub update_spot_sw push @{$rsp->{data}}, "Could not run command: $cmd.\n"; xCAT::MsgUtils->message("E", $rsp, $callback); - $error++; + return 1; } } } @@ -14190,7 +14187,7 @@ sub update_spot_sw my $rsp; push @{$rsp->{data}}, "Could not open $tmp_rpm for reading.\n"; xCAT::MsgUtils->message("E", $rsp, $callback); - $error++; + return 1; } else { my @rlist = ; @@ -14200,7 +14197,7 @@ sub update_spot_sw if ($rc) { #failed to update RPM - $error++; + return 1; } # remove tmp file @@ -14215,7 +14212,7 @@ sub update_spot_sw push @{$rsp->{data}}, "Could not run command: $cmd.\n"; xCAT::MsgUtils->message("E", $rsp, $callback); - $error++; + return 1; } } }