[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 04 Apr 2007 00:07:13 -0000


albertel		Tue Apr  3 20:07:13 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - hosts.tab no longer read on startup so moving it out of the begin block
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.861 loncom/lonnet/perl/lonnet.pm:1.862
--- loncom/lonnet/perl/lonnet.pm:1.861	Tue Apr  3 20:05:31 2007
+++ loncom/lonnet/perl/lonnet.pm	Tue Apr  3 20:07:07 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.861 2007/04/04 00:05:31 albertel Exp $
+# $Id: lonnet.pm,v 1.862 2007/04/04 00:07:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7704,15 +7704,6 @@
    &logthis("Shutting down");
 }
 
-BEGIN {
-
-# ----------------------------------- Read loncapa.conf and loncapa_apache.conf
-    unless ($readit) {
-{
-    my $configvars = LONCAPA::Configuration::read_conf('loncapa.conf');
-    %perlvar = (%perlvar,%{$configvars});
-}
-
 sub get_dns {
     my ($url,$func) = @_;
     open(my $config,"<$perlvar{'lonTabDir'}/hosts.tab");
@@ -7807,9 +7798,6 @@
 	$loaded=1;
     }
 
-    # FIXME: dev server don't want this, production servers _do_ want this
-    #&get_iphost();
-
     sub hostname {
 	&load_hosts_tab() if (!$loaded);
 
@@ -7925,6 +7913,16 @@
     }
 }
 
+BEGIN {
+
+# ----------------------------------- Read loncapa.conf and loncapa_apache.conf
+    unless ($readit) {
+{
+    my $configvars = LONCAPA::Configuration::read_conf('loncapa.conf');
+    %perlvar = (%perlvar,%{$configvars});
+}
+
+
 # ------------------------------------------------------ Read spare server file
 {
     open(my $config,"<$perlvar{'lonTabDir'}/spare.tab");