2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-21 08:33:20 +00:00

Merge pull request #7637 from VersatusHPC/harvest/rspconfig-empty-option-msg

fix(rspconfig): clearer error when no option is given
This commit is contained in:
Daniel Hilst
2026-07-27 08:22:07 -03:00
committed by GitHub
+9
View File
@@ -8404,6 +8404,15 @@ sub preprocess_request {
$option = $_;
$optset = 0;
}
if ($option eq '') {
foreach (@$all_noderange) {
$error_data .= "\n" if ($error_data);
$error_data .= "$_: options are required when using mgt=ipmi, see -h or the man page";
}
$callback->({ errorcode => [1], data => [ $error_data ] });
$request = {};
return;
}
unless ($option =~ /^USERID$|^ip$|^netmask$|^gateway$|^vlan$|^userid$|^username$|^password$|^snmpdest|^thermprofile$|^alert$|^garp$|^community$|^backupgateway$/) {
foreach (@$all_noderange) {
$error_data .= "\n" if ($error_data);