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" }