use strict; my %domserv=(); my %domname=(); my %hostdom=(); my %hostfunc=(); # Read the tables open(IN,"production_dns_domain.tab"); while (my $line=) { if ($line=~/^\s*\#/) { next; } chomp($line); unless ($line=~/\S/) { next; } my ($domain,$name,$auth,$authparm,$lang,$city,$coord1,$coord2,$lib)=split(/\:/,$line); if ($domserv{$domain}) { print "Domain $domain defined more than once in domain.tab\n"; } $domserv{$domain}=$lib; $domname{$domain}=$name; } close(IN); open(IN,"production_dns_hosts.tab"); while (my $line=) { if ($line=~/^\s*\#/) { next; } chomp($line); unless ($line=~/\S/) { next; } my ($server,$domain,$function,$ip)=split(/\:/,$line); if ($hostdom{$server}) { print "$server defined more than once in hosts.tab\n"; } $hostdom{$server}=$domain; $hostfunc{$server}=$function; } close(IN); # Every mentioned library server should be in hosts.tab foreach my $dom (keys %domserv) { unless ($hostdom{$domserv{$dom}} eq $dom) { print "Did not find $domserv{$dom} in hosts.tab\n"; } unless ($hostfunc{$domserv{$dom}} eq 'library') { print "$domserv{$dom} is not a library server ($hostfunc{$domserv{$dom}})\n"; } } # Every server should have a valid domain foreach my $serv (keys %hostdom) { unless ($domserv{$hostdom{$serv}}) { print "Server $serv has invalid domain in hosts.tab\n"; } unless (($hostfunc{$serv} eq 'library') || ($hostfunc{$serv} eq 'access')) { print "Server $serv has invalid function $hostfunc{$serv} in hosts.tab\n"; } } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.