fix for bug 2974910: check if the entry exists when running with chdef -m

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6453 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-06-13 08:42:05 +00:00
parent 0e87deb399
commit 8c3b6117e2

View File

@ -1099,6 +1099,22 @@ sub setobjdefs
split(/$delim/, $DBattrvals{$objname}{$attr_name});
my @minusList = split(/$delim/, $objhash{$objname}{$attr_name});
foreach my $em (@minusList)
{
if (!(grep {$_ eq $em} @currentList))
{
if (($::opt_t eq 'group') && ($DBattrvals{$objname}{'grouptype'} ne 'dynamic'))
{
my $rsp;
$rsp->{data}->[0] = "$objname is not a member of \'$em\'.";
xCAT::MsgUtils->message("W", $rsp, $::callback);
} else {
my $rsp;
$rsp->{data}->[0] = "$em is not in the atrribute of \'$attr_name\' for the \'$objname\' definition.";
xCAT::MsgUtils->message("W", $rsp, $::callback);
}
}
}
# make a new list without the one specified
my $first = 1;
my $newlist;