2
0
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:
Yuan Bai 2018-07-27 17:00:36 +08:00 committed by Gᴏɴɢ Jie
parent b480171f13
commit ee6314cb10

View File

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