Annotation of doc/loncapafiles/webserver.piml, revision 1.4

1.1       harris41    1: <!-- webserver.piml -->
                      2: <!-- Scott Harrison -->
                      3: 
1.4     ! harris41    4: <!-- $Id: webserver.piml,v 1.3 2002/02/02 13:08:42 harris41 Exp $ -->
1.1       harris41    5: 
                      6: <!--
                      7: 
                      8: Copyright Michigan State University Board of Trustees
                      9: 
                     10: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                     11: 
                     12: LON-CAPA is free software; you can redistribute it and/or modify
                     13: it under the terms of the GNU General Public License as published by
                     14: the Free Software Foundation; either version 2 of the License, or
                     15: (at your option) any later version.
                     16: 
                     17: LON-CAPA is distributed in the hope that it will be useful,
                     18: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     19: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     20: GNU General Public License for more details.
                     21: 
                     22: You should have received a copy of the GNU General Public License
                     23: along with LON-CAPA; if not, write to the Free Software
                     24: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     25: 
                     26: /home/httpd/html/adm/gpl.txt
                     27: 
                     28: http://www.lon-capa.org/
                     29: 
                     30: -->
                     31: 
                     32: <!-- Default values must be defined before specific values. -->
                     33: <!-- If no 'dist' attribute is specified, then it is always installed. -->
                     34: <!-- If 'dist' attribute is set to  'default', then the specification. -->
                     35: <!-- is accepted if an alternative distribution is not requested or not -->
                     36: <!-- defined. -->
                     37: 
                     38: <piml>
1.2       harris41   39: <targetroot>/abc/</targetroot>
                     40: <specialnotices>
                     41: <specialnotice>
                     42: </specialnotice>
                     43: </specialnotices>
1.1       harris41   44: <files>
                     45: <file>
                     46: <target dist='default'>/etc/httpd/conf/httpd.conf</target>
                     47: <note>This is always expected for any version of Apache</note>
                     48: <dependencies dist='default'>
                     49: /etc/httpd/conf/httpd.conf
                     50: </dependencies>
                     51: <perlscript mode='fg'>
                     52: unless (-e "<TARGET />") {
                     53: 	print 'ERROR! httpd.conf should exist! Are you missing the Apache '.
                     54: 		'software package';
                     55: }
                     56: else {
1.3       harris41   57:   $flag=0;
                     58:   open IN, "&lt;<TARGET />";
1.4     ! harris41   59:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/srm.conf/) { $flag=1; } }
1.3       harris41   60:   close IN;
                     61:   unless ($flag==0) {
1.1       harris41   62: 	open OUT,"&gt;&gt;<TARGET />";
1.4     ! harris41   63: 	print OUT 'Include conf/srm.conf'."\n";
1.3       harris41   64: 	close OUT;
                     65:   }
                     66:   $flag=0;
                     67:   open IN, "&lt;<TARGET />";
1.4     ! harris41   68:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/access.conf/) { $flag=1; } }
1.3       harris41   69:   close IN;
                     70:   unless ($flag==0) {
                     71: 	open OUT,"&gt;&gt;<TARGET />";
1.4     ! harris41   72: 	print OUT 'Include conf/access.conf'."\n";
1.1       harris41   73: 	close OUT;
1.3       harris41   74:   }
                     75:   $flag=0;
                     76:   my $eflag=0;
                     77:   open IN, "&lt;<TARGET />";
                     78:   while (&lt;IN&gt;) { 
1.4     ! harris41   79:     if (/^\s*Include\s+conf\/loncapa.conf/) {
1.3       harris41   80:       $flag=1; 
                     81:     }
                     82:   }
                     83:   close IN;
                     84:   unless ($flag==0) {
                     85: 	open OUT,"&gt;&gt;<TARGET />";
1.4     ! harris41   86: 	print OUT 'Include conf/loncapa.conf'."\n";
1.3       harris41   87: 	close OUT;
                     88:   }
1.1       harris41   89: }
                     90: </perlscript>
                     91: </file>
                     92: <file>
                     93: <target dist='default'>/etc/httpd/conf/access.conf</target>
                     94: <note>This may or may not exist on a system depending on the version of
                     95: Apache</note>
                     96: <dependencies dist='default'>
                     97: /etc/httpd/conf/access.conf
                     98: </dependencies>
                     99: <perlscript mode='fg'>
1.2       harris41  100: unless (-e "<TARGET />") {
                    101: 	print &lt;&lt;;
                    102: WARNING! access.conf is not currently present on your system.
                    103: This is either due to 
                    104: * you are missing the Apache software package,
                    105: * you have a newer version of Apache that does not
                    106:   ordinarily install an access.conf
                    107: * configuration files are installed in a directory location
                    108:   different than for <TARGET />
                    109: For backwards compatibility,
                    110: <TARGET /> is being generated.
                    111: END
                    112: }
1.3       harris41  113: my $flag=0;
                    114: open IN, "&lt;<TARGET />";
1.4     ! harris41  115: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
1.3       harris41  116: close IN;
                    117: unless ($flag==0) {
1.1       harris41  118: open OUT,"&gt;&gt;<TARGET />";
1.4     ! harris41  119: print OUT 'Include conf/loncapa.conf'."\n";
1.1       harris41  120: close OUT;
1.3       harris41  121: }
1.1       harris41  122: </perlscript>
                    123: </file>
                    124: <file>
                    125: <target dist='default'>/etc/httpd/conf/srm.conf</target>
                    126: <note>This may or may not exist on a system depending on the version of
                    127: Apache</note>
                    128: <dependencies dist='default'>
                    129: /etc/httpd/conf/srm.conf
                    130: </dependencies>
                    131: <perlscript mode='fg'>
1.2       harris41  132: unless (-e "<TARGET />") {
                    133: 	print &lt;&lt;;
                    134: WARNING! srm.conf is not currently present on your system.
                    135: This is either due to 
                    136: * you are missing the Apache software package,
                    137: * you have a newer version of Apache that does not
                    138:   ordinarily install an srm.conf
                    139: * configuration files are installed in a directory location
                    140:   different than for <TARGET />
                    141: For backwards compatibility,
                    142: <TARGET /> is being generated.
                    143: END
                    144: }
1.3       harris41  145: my $flag=0;
                    146: open IN, "&lt;<TARGET />";
1.4     ! harris41  147: while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
1.3       harris41  148: close IN;
                    149: unless ($flag==0) {
1.1       harris41  150: open OUT,"&gt;&gt;<TARGET />";
1.4     ! harris41  151: print OUT 'Include conf/loncapa.conf'."\n";
1.1       harris41  152: close OUT;
1.3       harris41  153: }
1.1       harris41  154: </perlscript>
                    155: </file>
                    156: </files>
                    157: </piml>

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