mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	Set CALLBACK for runcmd and runxcmd.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5166 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -95,6 +95,9 @@ sub preprocess_request | ||||
|  | ||||
|     my %sn; | ||||
|  | ||||
| 	# need for runcmd output | ||||
| 	$::CALLBACK=$cb; | ||||
|  | ||||
| 	# don't want preprocess to run on service node but _xcatdest is not set?? | ||||
|     #if ($req->{_xcatdest}) { return [$req]; }    #exit if preprocessed | ||||
|  | ||||
| @@ -327,6 +330,8 @@ sub process_request | ||||
|     my $msg; | ||||
|      | ||||
|     $::callback=$callback; | ||||
| 	# need for runcmd output | ||||
| 	$::CALLBACK=$callback; | ||||
|  | ||||
| 	# convert the hashes back to the way they were passed in | ||||
|     #   XML created arrays - we need to strip them out | ||||
|   | ||||
| @@ -75,6 +75,9 @@ sub preprocess_request | ||||
|     my $cb  = shift; | ||||
|     my %sn; | ||||
|  | ||||
| 	# need for runcmd output | ||||
|     $::CALLBACK=$cb; | ||||
|  | ||||
| 	#exit if preprocessed | ||||
|     if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; } | ||||
|  | ||||
| @@ -150,6 +153,9 @@ sub process_request | ||||
|     $::request  = shift; | ||||
|     my $callback = shift; | ||||
|  | ||||
| 	# need for runcmd output | ||||
| 	$::CALLBACK=$callback; | ||||
|  | ||||
|     my $ret; | ||||
|     my $msg; | ||||
| 	my $rsp; | ||||
| @@ -1047,7 +1053,7 @@ ions.\n"; | ||||
|     #   - NIM can't handle that | ||||
|     if ($#members > 1024) { | ||||
|     	my $rsp; | ||||
|        	$rsp->{data}->[0] = "$::msgstr Cannot create a NIM group definition with more than 1024 members - on \'$servname\'."; | ||||
|        	$rsp->{data}->[0] = "$::msgstr Cannot create a NIM group definition with more than 1024 members."; | ||||
|        	xCAT::MsgUtils->message("E", $rsp, $callback); | ||||
|        	next; | ||||
|     } | ||||
| @@ -1078,6 +1084,7 @@ ions.\n"; | ||||
| 		} | ||||
|  | ||||
| 		my $output = xCAT::Utils->runcmd("$cmd", -1); | ||||
|  | ||||
|    		if ($::RUNCMD_RC  != 0) | ||||
|    		{ | ||||
|    			my $rsp; | ||||
| @@ -1254,7 +1261,9 @@ sub getNIMmaster | ||||
|         $NimMaster = $::objhash{$node}{xcatmaster}; | ||||
|  | ||||
|     } else { | ||||
|         $NimMaster = $::local_host; | ||||
| 		my $nimprime = xCAT::InstUtils->getnimprime(); | ||||
|     	chomp $nimprime; | ||||
|         $NimMaster = $nimprime; | ||||
|     } | ||||
|  | ||||
|     # assume short hostnames for now??? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user