From 41b6208cdf464aaa31bcb8af82c94869994fd49f Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 9 Dec 2011 05:15:48 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/PPCdb.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/PPCdb.pm b/perl-xCAT/xCAT/PPCdb.pm index 58698e401..ee0c04964 100644 --- a/perl-xCAT/xCAT/PPCdb.pm +++ b/perl-xCAT/xCAT/PPCdb.pm @@ -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}; }