fixed the logic when get accounts from ppcdirect or ppchcp tables; supports groups such as cec,hmc,fsp...

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11195 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua
2011-12-09 05:15:48 +00:00
parent 22238d9d84
commit 41b6208cdf
+3 -3
View File
@@ -806,15 +806,15 @@ sub credentials {
##############################################################
# If no user/passwd found, check if there is a default group
##############################################################
elsif( ($ent) = $tab->getNodeAttribs( $defaultgrp{$hwtype}, qw(username password)))
else
{
if ( $user_specified)
{ # need regx
($ent) = $tab->getAttribs( {hcp=>$defaultgrp{$hwtype},username=>$user},qw(password));
($ent) = $tab->getAllAttribs( {hcp=>$defaultgrp{$hwtype},username=>$user},qw(password));
}
else
{
($ent) = $tab->getNodeAttribs( $defaultgrp{$hwtype}, qw(username password));
($ent) = $tab->getNodesAttribs( $defaultgrp{$hwtype}, qw(username password));
}
if ( $ent){
if (defined($ent->{password})) { $pass = $ent->{password}; }