2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-03 03:50:08 +00:00

disable rpower reset and boot command for OpenBMC

This commit is contained in:
XuWei 2017-09-20 22:10:29 -04:00
parent 29b989b789
commit af33fbe131
2 changed files with 7 additions and 5 deletions

View File

@ -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 <node> off' and then 'rpower <node> on' instead.";
return $check;
}
}
} elsif ($command eq "rinv") {
$subcommand = "all" if (!defined($ARGV[0]));
unless ($subcommand =~ /^model$|^serial$|^firm$|^cpu$|^dimm$|^all$/) {

View File

@ -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,