From fffadea1ec99f23090855094bc0bc4553b6dda29 Mon Sep 17 00:00:00 2001 From: sakolish Date: Fri, 30 Nov 2007 20:04:17 +0000 Subject: [PATCH] Add check if command supported by power method - Line #564 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPC.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/perl-xCAT-2.0/xCAT/PPC.pm b/perl-xCAT-2.0/xCAT/PPC.pm index aa80fb03a..d70d8310c 100644 --- a/perl-xCAT-2.0/xCAT/PPC.pm +++ b/perl-xCAT-2.0/xCAT/PPC.pm @@ -555,8 +555,15 @@ sub runcmd { my $request = shift; my $cmd = $request->{command}; my $method = $request->{method}; + my $hwtype = $request->{hwtype}; my $modname = $modules{$cmd}; - + + ###################################### + # Command not supported + ###################################### + if ( !defined( $modname )) { + return( ["$cmd not a supported command by $hwtype method"] ); + } ###################################### # Load specific module ######################################