From 9891c81a1dc0e5e167ad3b2985ee6af032c96ba2 Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 19 Mar 2010 08:43:24 +0000 Subject: [PATCH] fix for bug 2961729: do not check the object names if the object names are got from database git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 42cf0af3a..b913f704e 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -2608,14 +2608,19 @@ sub defls # if anything but the site table do this if ($type ne 'site') { - if (!grep(/^$obj$/, @allobjoftype)) + # check the object names only if + # the object names are passed in through command line + if ($::objectsfrom_args || (($type eq 'node') && ($::opt_o || @::noderange))) { - my $rsp; - $rsp->{data}->[0] = - "Could not find an object named \'$obj\' of type \'$type\'."; - xCAT::MsgUtils->message("I", $rsp, $::callback); - next; - } + if (!grep(/^$obj$/, @allobjoftype)) + { + my $rsp; + $rsp->{data}->[0] = + "Could not find an object named \'$obj\' of type \'$type\'."; + xCAT::MsgUtils->message("I", $rsp, $::callback); + next; + } + } } # end - if not site table # special handling for site table - for now !!!!!!!