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 ####################################