2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Fix incorrect usage output for OpenBMC rspconfig command

This commit is contained in:
Mark Gurevich 2018-01-24 10:47:47 -05:00
parent f075ff1121
commit 7561337bec

View File

@ -741,17 +741,17 @@ sub preprocess_request {
# Request usage for openbmc sections only
$usage_string = xCAT::Usage->parseCommand($command . ".openbmc", @exargs);
if ($usage_string =~ /cannot be found/) {
# Could not find usage for openbmc section, try getting usage for all sections
$usage_string = xCAT::Usage->parseCommand($command, @exargs);
}
else {
# Usage for openbmc section was extracted, append autogenerated usage for
# configured commands
$usage_string .= &build_config_api_usage($callback, $command);
}
if ($usage_string) {
if ($usage_string =~ /cannot be found/) {
# Could not find usage for openbmc section, try getting usage for all sections
$usage_string = xCAT::Usage->parseCommand($command, @exargs);
}
else {
# Usage for openbmc section was extracted, append autogenerated usage for
# configured commands
$usage_string .= &build_config_api_usage($callback, $command);
}
$callback->({ data => [$usage_string] });
$request = {};
return;