Fixed the issue of the syncfile function that output misleading message during installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8934 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -31,14 +31,14 @@ print $remote "</xcatrequest>\n"; | ||||
|  | ||||
| my $response=''; | ||||
| my $rsp; | ||||
| my $rc; | ||||
| my $rc = 0; | ||||
| while (<$remote>) { | ||||
|   $response .= $_; | ||||
|   if ($response =~ m/<\/xcatresponse>/) { | ||||
|     $rsp = eval { XMLin($response,SuppressEmpty=>undef,ForceArray=>1) }; | ||||
|     if ($rsp->{serverdone}) { | ||||
|       close $remote; | ||||
|       exit !$rc; | ||||
|       exit $rc; | ||||
|     } | ||||
|  | ||||
|     if ($rsp->{errorcode}) { | ||||
|   | ||||
| @@ -7,7 +7,7 @@ BEGIN { | ||||
|   } | ||||
|  | ||||
|   quit = "no" | ||||
|   exitcode = 1 | ||||
|   exitcode = 0 | ||||
|  | ||||
|   print "<xcatrequest>" |& server | ||||
|   print "   <command>syncfiles</command>" |& server | ||||
| @@ -17,8 +17,9 @@ BEGIN { | ||||
|     if (match($0,"<serverdone>")) { | ||||
|       quit = "yes" | ||||
|     } | ||||
|     if (match($0,"<errorcode>") || match($0,"<error>")) { | ||||
|       exitcode = 0 | ||||
|     if ((match($0,"<errorcode>") && !match($0,"<errorcode>0")) \ | ||||
|       || (match($0,"<error>") && !match($0,"<error>0")) ) { | ||||
|       exitcode = 1 | ||||
|     } | ||||
|  | ||||
|     if (match($0,"</xcatresponse>") && match(quit,"yes")) { | ||||
|   | ||||
| @@ -37,7 +37,7 @@ then | ||||
| returncode=$? | ||||
| fi | ||||
|  | ||||
| if [ $returncode -eq 1 ] | ||||
| if [ $returncode -eq 0 ] | ||||
| then | ||||
|   logger -t xCAT "$0: Perform Syncing File action successfully" | ||||
| else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user