mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-03 03:50:08 +00:00
enhance lsdef Noderange format error (#5442)
* Enhancement for handling lsdef node-range format error
This commit is contained in:
parent
b480171f13
commit
ee6314cb10
@ -765,6 +765,14 @@ sub processArgs
|
||||
# then set noderange
|
||||
if (($::command ne 'mkdef') && ($a =~ m/^\//))
|
||||
{
|
||||
eval { /$a/ };
|
||||
if ($@)
|
||||
{
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] = "Invalid regular expression $a, check the noderange syntax.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@::noderange = &noderange($a, 1); # Use the "verify" option to support regular expression
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user