From 78aa996774b8e9fedf68eaba97c6400ede7d09c0 Mon Sep 17 00:00:00 2001 From: linggao Date: Fri, 11 Jul 2008 18:27:32 +0000 Subject: [PATCH] added missing function pass_along in aixinstall.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1867 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 2322c0a80..471772899 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -25,6 +25,7 @@ use File::Path; Getopt::Long::Configure("bundling"); $Getopt::Long::ignorecase = 0; + #------------------------------------------------------------------------------ =head1 aixinstall @@ -94,6 +95,8 @@ sub process_request my $sub_req = shift; my $ret; my $msg; + + $::callback=$callback; my $command = $request->{command}->[0]; $::args = $request->{arg}; @@ -139,6 +142,21 @@ sub process_request return 0; } + +my $errored = 0; +sub pass_along { + my $resp = shift; + $::callback->($resp); + if ($resp and ($resp->{errorcode} and $resp->{errorcode}->[0]) or ($resp->{error} and $resp->{error}->[0])) { + $errored=1; + } + foreach (@{$resp->{node}}) { + if ($_->{error} or $_->{errorcode}) { + $errored=1; + } + } +} + #----------------------------------------------------------------------------