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

harris41 lon-capa-cvs@mail.lon-capa.org
Wed, 12 Jun 2002 17:07:55 -0000


harris41		Wed Jun 12 13:07:55 2002 EDT

  Modified files:              
    /doc/loncapafiles	updatequery.piml 
  Log:
  ensuring that values are set for lonLoadLim, lonExpire, and lonReceipt
  no matter what; also a minor typo fix; BUG 537 FIX
  
  
Index: doc/loncapafiles/updatequery.piml
diff -u doc/loncapafiles/updatequery.piml:1.15 doc/loncapafiles/updatequery.piml:1.16
--- doc/loncapafiles/updatequery.piml:1.15	Sun Jun  9 19:31:09 2002
+++ doc/loncapafiles/updatequery.piml	Wed Jun 12 13:07:55 2002
@@ -1,7 +1,7 @@
 <!-- updatequery.piml -->
 <!-- Scott Harrison -->
 
-<!-- $Id: updatequery.piml,v 1.15 2002/06/09 23:31:09 harris41 Exp $ -->
+<!-- $Id: updatequery.piml,v 1.16 2002/06/12 17:07:55 harris41 Exp $ -->
 
 <!--
 
@@ -264,16 +264,13 @@
     $perlvar{'lonDefDomain'}=$lonDefDomain;
     $perlvar{'lonAdmEMail'}=$lonAdmEMail;
     $perlvar{'lonRole'}=$lonRole;
-    unless ($perlvar{'lonSqlAccess'}) {
-       $perlvar{'lonSqlAccess'}='localhostkey';
-    }
-    unless ($perlvar{'lonLoadLim'}) {
+    unless ($perlvar{'lonLoadLim'} and $perlvar{'lonLoadLim'}!~/\{\[\[\[\[/) {
        $perlvar{'lonLoadLim'}='2.00';
     }
-    unless ($perlvar{'lonExpire'}) {
+    unless ($perlvar{'lonExpire'} and $perlvar{'lonExpire'}!~/\{\[\[\[\[/) {
        $perlvar{'lonExpire'}='86400';
     }
-    unless ($perlvar{'lonReceipt'}) {
+    unless ($perlvar{'lonReceipt'} and $perlvar{'lonReceipt'}!~/\{\[\[\[\[/) {
        my $lonReceipt='';
        srand(time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
        my @alnum=(0..9,a..z);
@@ -313,6 +310,21 @@
 	}
 	close(CONFIG);
     }
+    unless ($perlvar{'lonLoadLim'} and $perlvar{'lonLoadLim'}!~/\{\[\[\[\[/) {
+       $perlvar{'lonLoadLim'}='2.00';
+    }
+    unless ($perlvar{'lonExpire'} and $perlvar{'lonExpire'}!~/\{\[\[\[\[/) {
+       $perlvar{'lonExpire'}='86400';
+    }
+    unless ($perlvar{'lonReceipt'} and $perlvar{'lonReceipt'}!~/\{\[\[\[\[/) {
+       my $lonReceipt='';
+       srand(time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
+       my @alnum=(0..9,a..z);
+       foreach my $i (1..20) {
+	 $lonReceipt.=$alnum[int(rand(36))];
+       }
+       $perlvar{'lonReceipt'}=$lonReceipt;
+    }
 my %perlvarstatic;
     if (-e "${confdir}loncapa_apache.conf") {
 	open(CONFIG,'&lt;'.$confdir.'loncapa_apache.conf') or 
@@ -350,7 +362,7 @@
 chomp($choice);
   if ($choice==1) {
   print(&lt;&lt;END);
-2) Domain Name: $perlvar{'lonDefDomain'}
+1) Domain Name: $perlvar{'lonDefDomain'}
 ENTER NEW VALUE:
 END
     my $choice2=&lt;&gt;;
@@ -359,7 +371,7 @@
   }
   elsif ($choice==2) {
   print(&lt;&lt;END);
-1) Machine Name: $perlvar{'lonHostID'}
+2) Machine Name: $perlvar{'lonHostID'}
 ENTER NEW VALUE:
 END
     my $choice2=&lt;&gt;;