[LON-CAPA-cvs] cvs: doc /loncapafiles updatequery.piml

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 15 Sep 2006 21:01:08 -0000


raeburn		Fri Sep 15 17:01:08 2006 EDT

  Modified files:              
    /doc/loncapafiles	updatequery.piml 
  Log:
  Satisfying sles10 requirements.  If a configuration variable has been left blank (e.g., Support E-mail Address) comment out the line in loncapa.conf, as PerlSetVar gives an error preventing web server startup if only one argument. 
  
  
Index: doc/loncapafiles/updatequery.piml
diff -u doc/loncapafiles/updatequery.piml:1.48 doc/loncapafiles/updatequery.piml:1.49
--- doc/loncapafiles/updatequery.piml:1.48	Thu Aug 31 15:43:56 2006
+++ doc/loncapafiles/updatequery.piml	Fri Sep 15 17:01:07 2006
@@ -1,6 +1,6 @@
 <!-- updatequery.piml -->
 
-<!-- $Id: updatequery.piml,v 1.48 2006/08/31 19:43:56 raeburn Exp $ -->
+<!-- $Id: updatequery.piml,v 1.49 2006/09/15 21:01:07 raeburn Exp $ -->
 
 <!--
 
@@ -482,8 +482,10 @@
 
 
 # update loncapa.conf
-my $confdir='/etc/httpd/conf/';
-#my $confdir='';
+my $confdir = '/etc/httpd/conf/';
+if ('<DIST />' eq 'sles10') {
+     $confdir = '/etc/apache2/';
+}   
 my $filename='loncapa.conf';
 my %perlvar;
     if (-e "$confdir$filename") {
@@ -524,8 +526,12 @@
       die("Cannot output to $confdir$filename\n");
     foreach my $key (keys %perlvar) {
       my $value=$perlvar{$key};
+      my $line = "PerlSetVar     $key      $value"; 
+      if ($value eq '') {
+          $line = '#'.$line;
+      }
       print(OUT &lt;&lt;END);
-PerlSetVar     $key      $value
+$line
 END
     }
     close(OUT);
@@ -533,7 +539,8 @@
 </perlscript>
 </file>
 <file>
-<target dist='default'>/</target>
+<target dist='default'>/etc/httpd/conf/</target>
+<target dist='sles10'>/etc/apache2/</target>
 <perlscript mode='fg'>
 sub securesetting {
     my (%perlvar)=@_;
@@ -551,7 +558,7 @@
     return ($securestatus,$securenum);
 }
 # read values from loncapa.conf
-my $confdir='/etc/httpd/conf/';
+my $confdir = "<TARGET />";
 my $filename='loncapa.conf';
 my %perlvar;
 my ($securestatus,$securenum);
@@ -903,8 +910,12 @@
       die("Cannot output to $confdir$filename\n");
     foreach my $key (keys %perlvar) {
       my $value=$perlvar{$key};
+      my $line = "PerlSetVar     $key      $value";
+      if ($value eq '') {
+          $line = '#'.$line;
+      }
       print(OUT &lt;&lt;END) unless $perlvarstatic{$key};
-PerlSetVar     $key      $value
+$line
 END
     }
     close(OUT);