Fix the regular expression issue for list_all_nodegroups function

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14755 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
asirxing 2013-01-06 01:48:59 +00:00
parent 49060211d9
commit 424b8b5378

View File

@ -101,7 +101,7 @@ sub list_all_node_groups
my @groupnames = split ",", $gnames;
foreach my $groupname (@groupnames)
{
if (!grep(/$groupname/, @distinctgroups))
if (!grep(/^$groupname$/, @distinctgroups))
{ # not already in list
push @distinctgroups, $groupname;
}
@ -123,7 +123,7 @@ sub list_all_node_groups
foreach my $group (@grouplist)
{
my $groupname = $group->{groupname};
if (!grep(/$groupname/, @distinctgroups))
if (!grep(/^$groupname$/, @distinctgroups))
{ # not already in list
push @distinctgroups, $groupname;
}