From 4220d5b9aff12e161798aa21f05ebb19df6cd054 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 25 Mar 2010 06:38:39 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/PPCcfg.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/PPCcfg.pm b/perl-xCAT/xCAT/PPCcfg.pm index 02cb1da15..1b2e54f23 100644 --- a/perl-xCAT/xCAT/PPCcfg.pm +++ b/perl-xCAT/xCAT/PPCcfg.pm @@ -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 ); } } }