mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-16 09:31:10 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user