From: <li...@us...> - 2010-06-13 08:42:11
|
Revision: 6453 http://xcat.svn.sourceforge.net/xcat/?rev=6453&view=rev Author: ligc Date: 2010-06-13 08:42:05 +0000 (Sun, 13 Jun 2010) Log Message: ----------- fix for bug 2974910: check if the entry exists when running with chdef -m Modified Paths: -------------- xcat-core/trunk/perl-xCAT/xCAT/DBobjUtils.pm Modified: xcat-core/trunk/perl-xCAT/xCAT/DBobjUtils.pm =================================================================== --- xcat-core/trunk/perl-xCAT/xCAT/DBobjUtils.pm 2010-06-13 02:21:32 UTC (rev 6452) +++ xcat-core/trunk/perl-xCAT/xCAT/DBobjUtils.pm 2010-06-13 08:42:05 UTC (rev 6453) @@ -1099,6 +1099,22 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |