# There are one or more update processes that listen for status updates
# from client programs.
-# $Id: spong-server.pl,v 1.31 2000/11/29 21:01:38 sljohnson Exp $
+# $Id: spong-server.pl,v 1.32 2000/12/15 21:13:14 sljohnson Exp $
use lib "@@LIBDIR@@";
if( sort @HOSTS_LIST != sort keys %HOSTS ) {
@HOSTS_LIST = sort keys %HOSTS; }
- # Read in the group file
+ # Do the same thing for the groups file.
- require $groups_file if -f $groups_file;
+ $evalme = "";
+ open( GROUPS, $groups_file ) || die "Can't load $groups_file: $!";
+ while( <GROUPS> ) {
+ $evalme .= $_;
+ if( /^\s*%GROUPS\s*=\s*\(/ ) { $ingroups = 1; }
+ if( $ingroups && /^\s*[\'\"]?([^\s\'\"]+)[\'\"]?\s*\=\>\s*\{/ ) {
+ push( @GROUPS_LIST, $1 ); }
+ }
+ close( GROUPS );
+ eval $evalme || die "Invalid spong.groups file: $@";
+
+ if( sort @GROUPS_LIST != sort keys %GROUPS ) {
+ @GROUPS_LIST = sort keys %GROUPS; }
}