Diff for /doc/loncapafiles/updatequery.piml between versions 1.6 and 1.7

version 1.6, 2002/05/13 02:24:44 version 1.7, 2002/05/13 09:05:18
Line 52  sleep(3); Line 52  sleep(3);
 </perlscript>  </perlscript>
 </file>  </file>
 <file>  <file>
 <target dist='default'>/home/httpd/lonUsers2/</target>  <target dist='default'>/home/httpd/lonUsers/</target>
 <perlscript mode='fg'>  <perlscript mode='fg'>
 $|=1;  $|=1;
 unless (-e "<TARGET />") {  unless (-e "<TARGET />") {
Line 242  END Line 242  END
 }  }
   
 # update loncapa.conf  # update loncapa.conf
 #my $confdir='/etc/httpd/conf/';  my $confdir='/etc/httpd/conf/';
 my $confdir='';  #my $confdir='';
 my $filename='loncapa.conf';  my $filename='loncapa.conf';
 my %perlvar;  my %perlvar;
     if (-e "$confdir$filename") {      if (-e "$confdir$filename") {
Line 295  END Line 295  END
 <target dist='default'>/</target>  <target dist='default'>/</target>
 <perlscript mode='fg'>  <perlscript mode='fg'>
 # read values from loncapa.conf  # read values from loncapa.conf
 #my $confdir='/etc/httpd/conf/';  my $confdir='/etc/httpd/conf/';
 my $confdir='';  #my $confdir='';
 my $filename='loncapa.conf';  my $filename='loncapa.conf';
 my %perlvar;  my %perlvar;
     if (-e "$confdir$filename") {      if (-e "$confdir$filename") {
Line 311  my %perlvar; Line 311  my %perlvar;
  }   }
  close(CONFIG);   close(CONFIG);
     }      }
   my %perlvarstatic;
       if (-e "${confdir}loncapa_apache.conf") {
    open(CONFIG,'&lt;'.$confdir.'loncapa_apache.conf') or 
             die("Can't read ${confdir}loncapa_apache.conf");
    while (my $configline=&lt;CONFIG&gt;) {
       if ($configline =~ /^[^\#]*PerlSetVar/) {
    my ($unused,$varname,$varvalue)=split(/\s+/,$configline);
    chomp($varvalue);
    $perlvarstatic{$varname}=$varvalue;
       }
    }
    close(CONFIG);
       }
 # implement editing logic below, interactively  # implement editing logic below, interactively
 # update loncapa.conf until 7 is entered  # update loncapa.conf until 7 is entered
   
Line 394  END Line 407  END
   
   }    }
 }  }
       open(OUT,"&gt;$confdir$filename") or
         die("Cannot output to $confdir$filename\n");
       foreach my $key (keys %perlvar) {
         my $value=$perlvar{$key};
         print(OUT &lt;&lt;END) unless $perlvarstat{$key};
   PerlSetVar     $key      $value
   END
       }
       close(OUT);
 </perlscript>  </perlscript>
 </file>  </file>
 <file>  <file>

Removed from v.1.6  
changed lines
  Added in v.1.7


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