From 5896c2227f661009ce46a7e04b95a114f5b46c01 Mon Sep 17 00:00:00 2001 From: jjhua Date: Wed, 1 Jul 2009 06:03:26 +0000 Subject: [PATCH] fixed bug 2804616 rspconfig should support FSP/BPA nodes with mgt=hmc git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3680 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCcfg.pm | 14 ++++++++++++++ xCAT-server/lib/perl/xCAT/PPC.pm | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/PPCcfg.pm b/perl-xCAT/xCAT/PPCcfg.pm index 8658b892b..b95806830 100644 --- a/perl-xCAT/xCAT/PPCcfg.pm +++ b/perl-xCAT/xCAT/PPCcfg.pm @@ -53,6 +53,20 @@ sub parse_args { ############################################# # Get support command list ############################################# + my $sitetab = xCAT::Table->new( 'nodetype' ); + my $nodes = $request->{node}; + foreach (@$nodes) { + if ( defined( $sitetab )) { + my ($ent) = $sitetab->getAttribs({ node=>$_},'nodetype'); + if ( defined($ent) ) { + $request->{hwtype} = $ent->{nodetype}; + last; + } + + } + + } + my $supported = $rsp{$request->{hwtype}}; ############################################# diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index f0dcaa3f9..899e4e1ad 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1285,8 +1285,15 @@ sub process_request { my $request = {%$req}; $request->{command} = $req->{command}->[0]; $request->{stdin} = $req->{stdin}->[0]; - $request->{hwtype} = $package; +# $request->{hwtype} = $package; $request->{callback}= $callback; + ######################### + #This is a special case for rspconfig, we shouldn't set hwtype as$package. and reserved for other commands. + ######################### + if($request->{command} ne "rspconfig") { + $request->{hwtype} = $package; + } + #################################### # Option -V for verbose output ####################################