mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	enhance lsdef Noderange format error (#5442)
* Enhancement for handling lsdef node-range format error
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user