Skip to content

Commit

Permalink
Merge pull request #226 from federicoballarini/dev6735
Browse files Browse the repository at this point in the history
Fix host-group member deletion

NethServer/dev#6735
  • Loading branch information
gsanchietti committed Mar 23, 2023
2 parents 3710062 + b438844 commit 1043685
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -30,9 +30,11 @@ my $hostKey = shift || die("Missing host key argument");
my $hdb = esmith::HostsDB->open();

my @groups = ();
my @members = ();

foreach my $record ($hdb->get_all_by_prop('type' => 'host-group')) {
if(($record->prop('Members') || '') eq $hostKey) {
@members = split ',', $record->prop('Members');
if (grep(/^$hostKey$/, @members)) {
push @groups, $record->key;
}
}
Expand Down

0 comments on commit 1043685

Please sign in to comment.