From d6846d76ba7baf6051ddc5b6250c02abc09f54e9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 31 Oct 2007 03:39:56 +0000 Subject: [PATCH] Fix ipmi and bmcconfig retrieval of non-node attributes, was calling the Table API incorrectly git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@26 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../usr/lib/xcat/plugins/bmcconfig.pm | 2 +- xCAT-server-2.0/usr/lib/xcat/plugins/ipmi.pm | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/bmcconfig.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/bmcconfig.pm index 43dc33155..a0a759c7c 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/bmcconfig.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/bmcconfig.pm @@ -60,7 +60,7 @@ sub process_request { my $gennedpassword=0; my $bmc; my $password = 'PASSW0RD'; - if ($passtable) { $tmphash=$passtable->getAttribs({key=>'ipmi'},'username','password'); } + if ($passtable) { ($tmphash)=$passtable->getAttribs({key=>'ipmi'},'username','password'); } #Check for generics, can grab for both user and pass with a query #since they cannot be in disparate records in passwd tab if ($tmphash->{username}) { diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/ipmi.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/ipmi.pm index 04f67198f..a6dc8f81b 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/ipmi.pm @@ -310,17 +310,17 @@ sub ipmiinit { my $table = xCAT::Table->new('site'); if ($table) { - $tmp=$table->getAttribs({'key'=>'ipmimaxp'},'value'); + ($tmp)=$table->getAttribs({'key'=>'ipmimaxp'},'value'); if (defined($tmp)) { $ipmimaxp=$tmp->{value}; } - $tmp=$table->getAttribs({'key'=>'ipmitimeout'},'value'); + ($tmp)=$table->getAttribs({'key'=>'ipmitimeout'},'value'); if (defined($tmp)) { $ipmitimeout=$tmp->{value}; } - $tmp=$table->getAttribs({'key'=>'ipmiretries'},'value'); + ($tmp)=$table->getAttribs({'key'=>'ipmiretries'},'value'); if (defined($tmp)) { $ipmitrys=$tmp->{value}; } - $tmp=$table->getAttribs({'key'=>'ipmisdrcache'},'value'); + ($tmp)=$table->getAttribs({'key'=>'ipmisdrcache'},'value'); } $table = xCAT::Table->new('passwd'); if ($table) { - $tmp=$table->getAttribs({'key'=>'ipmi'},['username','password']); + ($tmp)=$table->getAttribs({'key'=>'ipmi'},'username','password'); if (defined($tmp)) { $ipmiuser = $tmp->{username}; $ipmipass = $tmp->{password}; @@ -4334,18 +4334,18 @@ sub process_request { my $ipmitab = xCAT::Table->new('ipmi'); my $tmp; if ($sitetab) { - $tmp=$sitetab->getAttribs({'key'=>'ipmimaxp'},'value'); + ($tmp)=$sitetab->getAttribs({'key'=>'ipmimaxp'},'value'); if (defined($tmp)) { $ipmimaxp=$tmp->{value}; } - $tmp=$sitetab->getAttribs({'key'=>'ipmitimeout'},'value'); + ($tmp)=$sitetab->getAttribs({'key'=>'ipmitimeout'},'value'); if (defined($tmp)) { $ipmitimeout=$tmp->{value}; } - $tmp=$sitetab->getAttribs({'key'=>'ipmiretries'},'value'); + ($tmp)=$sitetab->getAttribs({'key'=>'ipmiretries'},'value'); if (defined($tmp)) { $ipmitrys=$tmp->{value}; } - $tmp=$sitetab->getAttribs({'key'=>'ipmisdrcache'},'value'); + ($tmp)=$sitetab->getAttribs({'key'=>'ipmisdrcache'},'value'); if (defined($tmp)) { $enable_cache=$tmp->{value}; } } my $passtab = xCAT::Table->new('passwd'); if ($passtab) { - $tmp=$passtab->getAttribs({'key'=>'ipmi'},['username','password']); + ($tmp)=$passtab->getAttribs({'key'=>'ipmi'},'username','password'); if (defined($tmp)) { $ipmiuser = $tmp->{username}; $ipmipass = $tmp->{password};