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:
parent
f075ff1121
commit
7561337bec
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user