From 21c92e3076e21cffbedeb450572313211eaa572d Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 21 Apr 2011 09:49:40 +0000 Subject: [PATCH] defect 3289489: fix the issue that syncfile went wrong when have not syncfile entry in the policy table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9363 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/startsyncfiles.aix | 10 ++++++---- xCAT/postscripts/startsyncfiles.awk | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT/postscripts/startsyncfiles.aix b/xCAT/postscripts/startsyncfiles.aix index 20f23e2d4..76f16b73e 100644 --- a/xCAT/postscripts/startsyncfiles.aix +++ b/xCAT/postscripts/startsyncfiles.aix @@ -36,16 +36,18 @@ while (<$remote>) { $response .= $_; if ($response =~ m/<\/xcatresponse>/) { $rsp = eval { XMLin($response,SuppressEmpty=>undef,ForceArray=>1) }; - if ($rsp->{serverdone}) { - close $remote; - exit $rc; - } if ($rsp->{errorcode}) { $rc = $rsp->{errorcode}[0]; } elsif ($rsp->{error}) { $rc = $rsp->{error}[0]; } + if ($rsp->{serverdone}) { + close $remote; + if ($rc) { $rc = 1; } + exit $rc; + } + $response=''; } } diff --git a/xCAT/postscripts/startsyncfiles.awk b/xCAT/postscripts/startsyncfiles.awk index 3e28fc10b..20e83dbd1 100755 --- a/xCAT/postscripts/startsyncfiles.awk +++ b/xCAT/postscripts/startsyncfiles.awk @@ -1,7 +1,7 @@ #!/usr/bin/awk -f BEGIN { if (ENVIRON["USEOPENSSLFORXCAT"]) { - server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + server = "openssl s_client -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" } else { server = "/inet/tcp/0/127.0.0.1/400" }