[LON-CAPA-cvs] cvs: loncom / production_dns_domain.tab production_dns_hosts.tab production_dns_sanity.pl
www
www@source.lon-capa.org
Wed, 18 Aug 2010 22:57:12 -0000
www Wed Aug 18 22:57:12 2010 EDT
Modified files:
/loncom production_dns_domain.tab production_dns_hosts.tab
production_dns_sanity.pl
Log:
* Clemson University
* Updated sanity-check to look for new host-table entries
Index: loncom/production_dns_domain.tab
diff -u loncom/production_dns_domain.tab:1.73 loncom/production_dns_domain.tab:1.74
--- loncom/production_dns_domain.tab:1.73 Tue Jul 27 22:47:05 2010
+++ loncom/production_dns_domain.tab Wed Aug 18 22:57:12 2010
@@ -127,6 +127,7 @@
ohiouk12:Ohio University - K12:::en-US:Athens, OH:-82.1:39.329:ohiouk12l1
#Hosted
+clemson:Clemson University:::en-US::::clemsonl1
physnet:Physnet MSU:::en-US:East Lansing, MI:-84.483:42.737:pnetl1
valpo:Valparaiso University:::en-US::::valpol1
divinechild:Divine Child High School:::en-US::::divinechildl1
Index: loncom/production_dns_hosts.tab
diff -u loncom/production_dns_hosts.tab:1.101 loncom/production_dns_hosts.tab:1.102
--- loncom/production_dns_hosts.tab:1.101 Wed Aug 18 19:30:19 2010
+++ loncom/production_dns_hosts.tab Wed Aug 18 22:57:12 2010
@@ -142,6 +142,7 @@
ohiouk12l1:ohiouk12:library:capa4.phy.ohiou.edu:http:ohiou.edu
#Hosted - educogs library server
+clemsonl1:clemson:library:educog.com:http:educog.com
wsccl1:wscc:library:educog.com:http:educog.com
pnetl1:physnet:library:educog.com:http:educog.com
smuhsdl1:smuhsd:library:educog.com:http:educog.com
Index: loncom/production_dns_sanity.pl
diff -u loncom/production_dns_sanity.pl:1.2 loncom/production_dns_sanity.pl:1.3
--- loncom/production_dns_sanity.pl:1.2 Tue May 20 15:50:47 2008
+++ loncom/production_dns_sanity.pl Wed Aug 18 22:57:12 2010
@@ -24,7 +24,13 @@
if ($line=~/^\s*\#/) { next; }
chomp($line);
unless ($line=~/\S/) { next; }
- my ($server,$domain,$function,$ip)=split(/\:/,$line);
+ my ($server,$domain,$function,$ip,$protocol,$interdom)=split(/\:/,$line);
+ unless (($protocol eq 'http') || ($protocol eq 'https')) {
+ print "Invalid protocol $protocol for $server\n";
+ }
+ unless ($interdom=~/\./) {
+ print "Invalid internet domain $interdom for $server\n";
+ }
if ($hostdom{$server}) {
print "$server defined more than once in hosts.tab\n";
}
@@ -35,6 +41,7 @@
# Every mentioned library server should be in hosts.tab
+my $doms=0;
foreach my $dom (keys %domserv) {
unless ($hostdom{$domserv{$dom}} eq $dom) {
print "Did not find $domserv{$dom} in hosts.tab\n";
@@ -42,10 +49,12 @@
unless ($hostfunc{$domserv{$dom}} eq 'library') {
print "$domserv{$dom} is not a library server ($hostfunc{$domserv{$dom}})\n";
}
+ $doms++;
}
# Every server should have a valid domain
+my $servs=0;
foreach my $serv (keys %hostdom) {
unless ($domserv{$hostdom{$serv}}) {
print "Server $serv has invalid domain in hosts.tab\n";
@@ -53,4 +62,7 @@
unless (($hostfunc{$serv} eq 'library') || ($hostfunc{$serv} eq 'access')) {
print "Server $serv has invalid function $hostfunc{$serv} in hosts.tab\n";
}
+ $servs++;
}
+print "\nValidated $doms domains and $servs servers\n";
+