From af33fbe1312663ad363eb00edfd8be93dd432dcf Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 20 Sep 2017 22:10:29 -0400 Subject: [PATCH] disable rpower reset and boot command for OpenBMC --- xCAT-server/lib/xcat/plugins/openbmc.pm | 7 +++++++ xCAT-server/lib/xcat/plugins/rinstall.pm | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 7c2ccca17..36fe74dee 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -545,6 +545,13 @@ sub parse_args { unless ($subcommand =~ /^on$|^off$|^softoff$|^reset$|^boot$|^bmcreboot$|^bmcstate$|^status$|^stat$|^state$/) { return ([ 1, "Unsupported command: $command $subcommand" ]); } + if ($subcommand =~ /^reset$|^boot$/) { + $check = unsupported($callback); + if (ref($check) eq "ARRAY") { + @$check[1] = "Command $command $subcommand is not supported now.\nPlease run 'rpower off' and then 'rpower on' instead."; + return $check; + } + } } elsif ($command eq "rinv") { $subcommand = "all" if (!defined($ARGV[0])); unless ($subcommand =~ /^model$|^serial$|^firm$|^cpu$|^dimm$|^all$/) { diff --git a/xCAT-server/lib/xcat/plugins/rinstall.pm b/xCAT-server/lib/xcat/plugins/rinstall.pm index 003ef2507..735ed9bca 100644 --- a/xCAT-server/lib/xcat/plugins/rinstall.pm +++ b/xCAT-server/lib/xcat/plugins/rinstall.pm @@ -548,11 +548,6 @@ sub rinstall { arg => \@rpowerarg ); - #TODO: When OPENBMC support is finished, this line should be removed - if($hmkey =~ /^openbmc$/){ - $req{environment}{XCAT_OPENBMC_DEVEL} = "YES"; - } - my $res = xCAT::Utils->runxcmd( \%req,