Diff for /doc/loncapafiles/webserver.piml between versions 1.11 and 1.12

version 1.11, 2002/05/16 01:22:38 version 1.12, 2003/01/07 19:01:58
Line 58  unless (-e "<TARGET />") { Line 58  unless (-e "<TARGET />") {
   exit(1);    exit(1);
 }  }
 else {  else {
   $flag=0;    # Append loncapa_apache.conf inclusion to httpd.conf if not present.
   open IN, "&lt;<TARGET />";  
   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/srm.conf/) { $flag=1; } }  
   close IN;  
   if ($flag!=1 and -e '/etc/httpd/conf/srm.conf') {  
     open OUT,"&gt;&gt;<TARGET />";  
     print OUT 'Include conf/srm.conf'."\n";  
     close OUT;  
   }  
   $flag=0;  
   open IN, "&lt;<TARGET />";  
   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/access.conf/) { $flag=1; } }  
   close IN;  
   if ($flag!=1 and -e '/etc/httpd/conf/access.conf') {  
     open(OUT,'&gt;&gt;<TARGET />');  
     print(OUT 'Include conf/access.conf'."\n");  
     close(OUT);  
   }  
   my $eflag=0;  
   $flag=0;    $flag=0;
   open(IN,'&lt;<TARGET />');    open(IN,'&lt;<TARGET />');
   while (&lt;IN&gt;) {     while (&lt;IN&gt;) { 
Line 90  else { Line 72  else {
     print(OUT 'Include conf/loncapa_apache.conf'."\n");      print(OUT 'Include conf/loncapa_apache.conf'."\n");
     close(OUT);      close(OUT);
   }    }
   $flag=0;    # Remove loncapa.conf inclusion from httpd.conf if present.
   open(IN,'&lt;<TARGET />');  
   while (&lt;IN&gt;) {  
     if (/^\s*Include\s+conf\/loncapa.conf/) {  
       $flag=1;  
     }  
   }  
   close(IN);  
   $in='';  
   if ($flag==1) {  
     open(IN,'&lt;<TARGET />');  
     while(&lt;IN&gt;) {  
       $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;  
     }  
     close(IN);  
     open(OUT,'&gt;<TARGET />');  
     print(OUT $in."\n");  
     close(OUT);  
   }  
 }  
 </perlscript>  
 </file>  
 <file>  
 <target dist='default'>/etc/httpd/conf/access.conf</target>  
 <note>This may or may not exist on a system depending on the version of  
 Apache</note>  
 <dependencies dist='default'>  
 /etc/httpd/conf/access.conf  
 </dependencies>  
 <perlscript mode='fg'>  
 if (-e '<TARGET />') {  
   my $flag=0;  
   open(IN,'&lt;<TARGET />');  
   while (&lt;IN&gt;) {  
     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {  
       $flag=1;  
     }  
   }  
   close(IN);  
   unless ($flag==1) {  
     open(OUT,'&gt;&gt;<TARGET />');  
     print(OUT 'Include conf/loncapa_apache.conf'."\n");  
     close(OUT);  
   }  
   $flag=0;  
   open(IN,'&lt;<TARGET />');  
   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }  
   close(IN);  
   $in='';  
   if ($flag==1) {  
     open(IN,'&lt;<TARGET />');  
     while(&lt;IN&gt;) {  
       $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;  
     }  
     close(IN);  
     open(OUT,'&gt;<TARGET />');  
     print(OUT $in."\n");  
     close(OUT);  
   }  
 }  
 </perlscript>  
 </file>  
 <file>  
 <target dist='default'>/etc/httpd/conf/srm.conf</target>  
 <note>This may or may not exist on a system depending on the version of  
 Apache</note>  
 <dependencies dist='default'>  
 /etc/httpd/conf/srm.conf  
 </dependencies>  
 <perlscript mode='fg'>  
 if (-e '<TARGET />') {  
   my $flag=0;  
   open(IN,'&lt;<TARGET />');  
   while (&lt;IN&gt;) {  
     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {  
       $flag=1;  
     }  
   }  
   close(IN);  
   unless ($flag==1) {  
     open(OUT,'&gt;&gt;<TARGET />');  
     print(OUT 'Include conf/loncapa_apache.conf'."\n");  
     close(OUT);  
   }  
   $flag=0;    $flag=0;
   open(IN,'&lt;<TARGET />');    open(IN,'&lt;<TARGET />');
   while (&lt;IN&gt;) {    while (&lt;IN&gt;) {

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


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