From 4c77f42d1b7b897c7586ed9ee12ebcd319ddb70d Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 10 Nov 2009 03:29:08 +0000 Subject: [PATCH] fix for bug 2894644: check empty noderange, if empty noderange, returns git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4528 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 4dbce91ba..b620afc9d 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -283,6 +283,13 @@ sub processArgs { @::noderange = &noderange($a, 0); # mkdef could not spport regular expression } + if (scalar(@::noderange) == 0) + { + my $rsp; + $rsp->{data}->[0] = "No node in \'$a\', check the noderange syntax."; + xCAT::MsgUtils->message("E", $rsp, $::callback); + return 1; + } } }