Diff for /doc/loncapafiles/updatequery.piml between versions 1.30 and 1.31

version 1.30, 2004/05/21 20:40:53 version 1.31, 2004/06/01 15:55:00
Line 408  END Line 408  END
 <file>  <file>
 <target dist='default'>/</target>  <target dist='default'>/</target>
 <perlscript mode='fg'>  <perlscript mode='fg'>
   sub securesetting {
       my (%perlvar)=@_;
       my $securestatus='unknown';
       my $securenum='';
       if      ( $perlvar{'loncAllowInsecure'}&&  $perlvar{'londAllowInsecure'}) {
    $securestatus='no';                  $securenum='4';
       } elsif ( $perlvar{'loncAllowInsecure'}&& !$perlvar{'londAllowInsecure'}) {
    $securestatus='lond';                $securenum='3';
       } elsif (!$perlvar{'loncAllowInsecure'}&&  $perlvar{'londAllowInsecure'}) {
    $securestatus='lonc';                $securenum='2';
       } elsif (!$perlvar{'loncAllowInsecure'}&& !$perlvar{'londAllowInsecure'}) {
    $securestatus='yes (lond and lonc)'; $securenum='1';
       }
       return ($securestatus,$securenum);
   }
 # read values from loncapa.conf  # read values from loncapa.conf
 my $confdir='/etc/httpd/conf/';  my $confdir='/etc/httpd/conf/';
 my $filename='loncapa.conf';  my $filename='loncapa.conf';
 my %perlvar;  my %perlvar;
   my ($securestatus,$securenum);
     if (-e "$confdir$filename") {      if (-e "$confdir$filename") {
  open(CONFIG,'&lt;'.$confdir.$filename) or    open(CONFIG,'&lt;'.$confdir.$filename) or 
           die("Can't read $confdir$filename");            die("Can't read $confdir$filename");
Line 433  my %perlvar; Line 449  my %perlvar;
     unless ($perlvar{'lonExpire'} and $perlvar{'lonExpire'}!~/\{\[\[\[\[/) {      unless ($perlvar{'lonExpire'} and $perlvar{'lonExpire'}!~/\{\[\[\[\[/) {
        $perlvar{'lonExpire'}='86400';         $perlvar{'lonExpire'}='86400';
     }      }
       unless ($perlvar{'londAllowInsecure'} and $perlvar{'londAllowInsecure'}!~/\{\[\[\[\[/) {
          $perlvar{'londAllowInsecure'}='1';
       }
       unless ($perlvar{'loncAllowInsecure'} and $perlvar{'loncAllowInsecure'}!~/\{\[\[\[\[/) {
          $perlvar{'loncAllowInsecure'}='1';
       }
       ($securestatus,$securenum)=&securesetting(%perlvar);
     unless ($perlvar{'lonReceipt'} and $perlvar{'lonReceipt'}!~/\{\[\[\[\[/) {      unless ($perlvar{'lonReceipt'} and $perlvar{'lonReceipt'}!~/\{\[\[\[\[/) {
        my $lonReceipt='';         my $lonReceipt='';
        srand(time ^ $$ ^ unpack "%L*", `ps axww | gzip`);         srand(time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
Line 490  while (!$flag) { Line 513  while (!$flag) {
   
 ===============================================================================  ===============================================================================
 This is now the current configuration of your machine.  This is now the current configuration of your machine.
 1) Domain Name: $perlvar{'lonDefDomain'}   1) Domain Name: $perlvar{'lonDefDomain'}
 2) Domain Description: $domainDescription   2) Domain Description: $domainDescription
 3) Machine Name: $perlvar{'lonHostID'}   3) Machine Name: $perlvar{'lonHostID'}
 4) System Administrator's E-mail Address: $perlvar{'lonAdmEMail'}   4) System Administrator's E-mail Address: $perlvar{'lonAdmEMail'}
 5) Role: $perlvar{'lonRole'}   5) Role: $perlvar{'lonRole'}
 6) Cache Expiration Time: $perlvar{'lonExpire'}   6) Cache Expiration Time: $perlvar{'lonExpire'}
 7) Server Load: $perlvar{'lonLoadLim'}   7) Server Load: $perlvar{'lonLoadLim'}
 8) User Load: $perlvar{'lonUserLoadLim'}   8) User Load: $perlvar{'lonUserLoadLim'}
 9) Everything is correct up above   9) Allow only secure connections: $securestatus 
   10) Everything is correct up above
 END  END
 my $hbug=-1;  my $hbug=-1;
 my $dbug=-1;  my $dbug=-1;
Line 525  if ($dbug) { Line 549  if ($dbug) {
 }  }
   
   print(&lt;&lt;END);    print(&lt;&lt;END);
 ENTER A CHOICE OF 1-8 TO CHANGE, otherwise ENTER 9:  ENTER A CHOICE OF 1-9 TO CHANGE, otherwise ENTER 10:
 END  END
 my $choice=&lt;&gt;;  my $choice=&lt;&gt;;
 chomp($choice);  chomp($choice);
Line 611  END Line 635  END
     $perlvar{'lonUserLoadLim'}=$choice2;      $perlvar{'lonUserLoadLim'}=$choice2;
   }    }
   elsif ($choice==9) {    elsif ($choice==9) {
     print(&lt;&lt;END);
   9) Allow only secure connections: $securestatus 
   The Lon-CAPA communication daemons lonc and lond can be configured to
   allow only secure connections by default.
   
   POSSIBLE CHOICES:
   1) allow only secure connections and don't connect to machines that
       can not be connected to securely
   2) allow only secure connections but allow this machine to connect to 
       machines that don't support secure connections
   3) allow insecure connections to this machine but only allow connections
       to machines that support secure connections
   4) allow insecure connections
   ENTER NEW VALUE (currenly $securenum):
   END
       my $choice2=&lt;&gt;;
       chomp($choice2);
       if      ($choice2 eq '1') {
    $perlvar{'loncAllowInsecure'}=0;$perlvar{'londAllowInsecure'}=0;
       } elsif ($choice2 eq '2') {
    $perlvar{'loncAllowInsecure'}=0;$perlvar{'londAllowInsecure'}=1;
       } elsif ($choice2 eq '3') {
    $perlvar{'loncAllowInsecure'}=1;$perlvar{'londAllowInsecure'}=0;
       } elsif ($choice2 eq '4') {
    $perlvar{'loncAllowInsecure'}=1;$perlvar{'londAllowInsecure'}=1;
       }
       ($securestatus,$securenum)=&securesetting(%perlvar);
     }
     elsif ($choice==10) {
     $flag=1;      $flag=1;
   }    }
   else {    else {

Removed from v.1.30  
changed lines
  Added in v.1.31


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