Diff for /loncom/Attic/lonManage between versions 1.10 and 1.11

version 1.10, 2003/08/18 10:43:31 version 1.11, 2003/08/18 10:45:32
Line 50 Line 50
 #    not the IP address of the host.  #    not the IP address of the host.
 #  #
 #  $Log$  #  $Log$
   #  Revision 1.11  2003/08/18 10:45:32  foxr
   #  Felt strongly enough about hoisting ReadConfiguration into a separate sub
   #  that I did it now before I forgot.
   #
 #  Revision 1.10  2003/08/18 10:43:31  foxr  #  Revision 1.10  2003/08/18 10:43:31  foxr
 #  Code/test ValidHost.  The hosts.tab and the perl variables are read in as  #  Code/test ValidHost.  The hosts.tab and the perl variables are read in as
 #  global hashes as a side effect.  May later want to clean this up by making  #  global hashes as a side effect.  May later want to clean this up by making
Line 202  sub ParseArgs { Line 206  sub ParseArgs {
     return @result;      return @result;
 }  }
 #  #
   #  Read the loncapa configuration stuff.
   #
   sub ReadConfig {
       my $perlvarref = LONCAPA::Configuration::read_conf('loncapa.conf');
       %perlvar       = %{$perlvarref};
       my $hoststab   = LONCAPA::Configuration::read_hosts(
    "$perlvar{'lonTabDir'}/hosts.tab");
       %hostshash     = %{$hoststab};
   
   }
   #
 #  Determine if the target host is valid.  #  Determine if the target host is valid.
 #  This is done by reading the current hosts.tab file.  #  This is done by reading the current hosts.tab file.
 #  For the host to be valid, it must be inthe file.  #  For the host to be valid, it must be inthe file.
Line 214  sub ParseArgs { Line 229  sub ParseArgs {
 #  #
 sub ValidHost {  sub ValidHost {
     my $host       = shift;      my $host       = shift;
      
     my $perlvarref = LONCAPA::Configuration::read_conf('loncapa.conf');      ReadConfig;
     %perlvar       = %{$perlvarref};  
     my $hoststab   = LONCAPA::Configuration::read_hosts(  
  "$perlvar{'lonTabDir'}/hosts.tab");  
     %hostshash     = %{$hoststab};  
   
     return defined $hostshash{$host};      return defined $hostshash{$host};
   

Removed from v.1.10  
changed lines
  Added in v.1.11


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>