From a0e5597593d8060bf028e648f803d28209f5435f Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 18 Aug 2010 03:21:19 +0000 Subject: [PATCH] fix the error that handle the return code when initiate the syncfile git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7121 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/startsyncfiles.aix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT/postscripts/startsyncfiles.aix b/xCAT/postscripts/startsyncfiles.aix index 10b1be39f..d42eaaf78 100644 --- a/xCAT/postscripts/startsyncfiles.aix +++ b/xCAT/postscripts/startsyncfiles.aix @@ -31,18 +31,20 @@ print $remote "\n"; my $response=''; my $rsp; +my $rc; while (<$remote>) { $response .= $_; if ($response =~ m/<\/xcatresponse>/) { $rsp = eval { XMLin($response,SuppressEmpty=>undef,ForceArray=>1) }; if ($rsp->{serverdone}) { close $remote; - exit 1; + exit !$rc; } - if ($rsp->{errorcode} || $rsp->{error}) { - close $remote; - exit 0; + if ($rsp->{errorcode}) { + $rc = $rsp->{errorcode}[0]; + } elsif ($rsp->{error}) { + $rc = $rsp->{error}[0]; } $response=''; }