Fixed one issue for rspconfig to initialize multiple BPA/CEC passwords

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5577 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2010-03-25 06:38:39 +00:00
parent 89c458d8e9
commit 4220d5b9af

View File

@ -298,16 +298,17 @@ sub passwd {
while ( my ($cec,$h) = each(%$hash) ) {
while ( my ($node,$d) = each(%$h) ) {
my $type = @$d[4];
my $data = xCAT::PPCcli::chsyspwd( $exp, $usr, $type, $cec, $newpasswd, $passwd );
my $data = xCAT::PPCcli::chsyspwd( $exp, $usr, $type, $cec, $passwd, $newpasswd );
my $Rc = shift(@$data);
$usr =~ s/^access$/HMC/g;
push @$result, [$node,"$usr: @$data[0]",$Rc];
my $usr_back = $usr;
$usr_back =~ s/^access$/HMC/g;
push @$result, [$node,"$usr_back: @$data[0]",$Rc];
##################################
# Write the new password to table
##################################
if ( $Rc == SUCCESS ) {
xCAT::PPCdb::update_credentials( $node, $type, $usr, $newpasswd );
xCAT::PPCdb::update_credentials( $node, $type, $usr_back, $newpasswd );
}
}
}