From f4373ce76218bbcb753af2df2349561afa5bcdf2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 4 Dec 2012 15:58:41 +0000 Subject: [PATCH] Have remoteimmsetup cope with the concept of distinct web/cli password versus ipmi password git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14544 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/bmcconfig.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcconfig.pm b/xCAT-server/lib/xcat/plugins/bmcconfig.pm index 577c998a6..95c75da96 100644 --- a/xCAT-server/lib/xcat/plugins/bmcconfig.pm +++ b/xCAT-server/lib/xcat/plugins/bmcconfig.pm @@ -119,6 +119,18 @@ sub process_request { $bmc=$tmphash->{$node}->[0]->{bmc}; } $username = $authmap->{$node}->{username}; + my $cliusername; + if ($authmap->{$node}->{cliusername}) { + $cliusername = $authmap->{$node}->{cliusername}; + } else { + $cliusername = $username; + } + my $clipassword; + if ($authmap->{$node}->{clipassword}) { + $clipassword = $authmap->{$node}->{clipassword}; + } else { + $clipassword = $password; + } unless (defined $bmc) { xCAT::MsgUtils->message('S',"Unable to identify bmc for $node, refusing to give config data"); $callback->({error=>["Invalid table configuration for bmcconfig"],errorcode=>[1]}); @@ -132,7 +144,7 @@ sub process_request { return 1; } if ($request->{command}->[0] eq 'remoteimmsetup') { - xCAT::IMMUtils::setupIMM($node,cliusername=>$username,clipassword=>$password,callback=>$callback); + xCAT::IMMUtils::setupIMM($node,cliusername=>$cliusername,clipassword=>$clipassword,username=>$username,password=>$password,callback=>$callback); return; } my $response={bmcip=>$ip,netmask=>$mask,gateway=>$gw,username=>$username,password=>$password};