#!/usr/local/bin/perl # edit_group.cgi # Display an existing Webmin group for editing require './cluster-webmin-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'group_title2'}, ""); @hosts = &list_webmin_hosts(); @mods = &all_modules(\@hosts); @wgroups = &all_groups(\@hosts); @servers = &list_servers(); if ($in{'host'} ne '') { ($host) = grep { $_->{'id'} == $in{'host'} } @hosts; ($edgrp) = grep { $_->{'name'} eq $in{'group'} } @{$host->{'groups'}}; } else { foreach $h (@hosts) { local ($g) =grep { $_->{'name'} eq $in{'group'} } @{$h->{'groups'}}; if ($g) { $host = $h; $edgrp = $g; last; } } } ($serv) = grep { $_->{'id'} == $host->{'id'} } @servers; foreach $h (@hosts) { local ($g) = grep { $_->{'name'} eq $in{'group'} } @{$h->{'groups'}}; if ($g) { push(@got, grep { $_->{'id'} == $h->{'id'} } @servers); } } print "