mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Modify credentials subroutine. Change finding fsp/bpa's password to finding CEC/Frame's.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9082 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -731,6 +731,23 @@ sub credentials { | ||||
|         $pass = @{$logon{$hwtype}}[1]; | ||||
|     } | ||||
|  | ||||
|     ########################################### | ||||
|     # find parent for fsp/bpa, use parent's attributes first | ||||
|     ########################################### | ||||
|     my $ntype = xCAT::DBobjUtils->getnodetype($server); | ||||
|     if ($ntype =~ /^(fsp|bpa)$/)  { | ||||
|         my $ptab =  xCAT::Table->new('ppc'); | ||||
|         if ($ptab)  { | ||||
|             my $parent = $ptab->getNodeAttribs($server, ["parent"]); | ||||
|             if ($parent and $parent->{parent})  { | ||||
|                 my $ptype = xCAT::DBobjUtils->getnodetype($parent->{parent}); | ||||
|                 if (($ptype =~ /^cec$/ and $ntype =~ /^fsp$/) or ($ptype =~ /^frame$/ and $ntype =~ /^bpa$/)) | ||||
|                 { | ||||
|                     $server = $parent->{parent}; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     ########################################### | ||||
|     # Check passwd tab | ||||
|     ########################################### | ||||
|   | ||||
		Reference in New Issue
	
	Block a user