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

version 1.27, 2003/05/19 18:35:50 version 1.30, 2004/05/21 20:40:53
Line 57  unless (-l "<TARGET />") { Line 57  unless (-l "<TARGET />") {
   print(&lt;&lt;END);    print(&lt;&lt;END);
   
 ===============================================================================  ===============================================================================
 What hosts.tab and domain.tab would you like to have installed?  Which cluster option would you like to have installed?
 (hosts.tab is a listing of all other internet machines  IMPORTANT: to take advantage of the cluster options 1) and 3),
 that a server system considers to be valid server systems  you must contact lon-capa\@lon-capa.org.
 on the LON-CAPA network  
 domain.tab is a description of the internal LON-CAPA domains)  1) PRODUCTION - you want to eventually connect this machine to the
                   LON-CAPA content sharing network. This setting is for
 1) PRODUCTION - you want to deliver courses today or sometime very soon                  schools, colleges, and universities, that currently
                 on this machine                  are running - or in the future will run - courses
 2) STAND-ALONE - you want this machine to run in 'stand-alone' mode and  2) STAND-ALONE - you want this machine to run in 'stand-alone' mode and
                  not be connected to other LON-CAPA machines for now                   not be connected to other LON-CAPA machines for now
 3) DEVELOPMENT - you want to play with or explore LON-CAPA  3) DEVELOPMENT - you want to do software (not content!) development with
                    this workstation and eventually link it with the
                    workstations of other LON-CAPA software developers.
 4) PRESERVE the existing hosts.tab and domain.tab  4) PRESERVE the existing hosts.tab and domain.tab
                 (/home/httpd/lonTabs/hosts.tab and                  (/home/httpd/lonTabs/hosts.tab and
                  /home/httpd/lonTabs/domain.tab)                   /home/httpd/lonTabs/domain.tab)
Line 126  END Line 128  END
 <perlscript mode='fg'>  <perlscript mode='fg'>
 $|=1;  $|=1;
 my $domainDescription;  my $domainDescription;
   my $domainTabExtras;
 unless (-e "<TARGET />") {  unless (-e "<TARGET />") {
   print(&lt;&lt;END);    print(&lt;&lt;END);
            WELCOME TO LON-CAPA!             WELCOME TO LON-CAPA!
Line 456  my %perlvarstatic; Line 459  my %perlvarstatic;
        open(IN,'&lt;../'.$lonCluster.'_domain.tab');         open(IN,'&lt;../'.$lonCluster.'_domain.tab');
        while(&lt;IN&gt;) {         while(&lt;IN&gt;) {
           if (/^$perlvar{'lonDefDomain'}\:/) {            if (/^$perlvar{'lonDefDomain'}\:/) {
      (undef,$domainDescription)=split(/:/,$_);       (undef,$domainDescription,$domainTabExtras)=split(/:/,$_,3);
      chomp($domainDescription);       chomp($domainDescription);
        chomp($domainTabExtras);
              last;               last;
           }            }
        }         }
Line 467  my %perlvarstatic; Line 471  my %perlvarstatic;
        open(IN,'&lt;/home/httpd/lonTabs/domain.tab');         open(IN,'&lt;/home/httpd/lonTabs/domain.tab');
        while(&lt;IN&gt;) {         while(&lt;IN&gt;) {
           if (/^$perlvar{'lonDefDomain'}\:/) {            if (/^$perlvar{'lonDefDomain'}\:/) {
      (undef,$domainDescription)=split(/:/,$_);       (undef,$domainDescription,$domainTabExtras)=split(/:/,$_,3);
      chomp($domainDescription);       chomp($domainDescription);
        chomp($domainTabExtras);
              last;               last;
           }            }
        }         }
Line 638  unless (-l "<TARGET />") { Line 643  unless (-l "<TARGET />") {
   $line2insert=&lt;&lt;END;    $line2insert=&lt;&lt;END;
 $perlvar{'lonHostID'}:$perlvar{'lonDefDomain'}:$perlvar{'lonRole'}:$hostname:$hostaddress  $perlvar{'lonHostID'}:$perlvar{'lonDefDomain'}:$perlvar{'lonRole'}:$hostname:$hostaddress
 END  END
   $domaininsert="$perlvar{'lonDefDomain'}:$domainDescription\n";    $domaininsert="$perlvar{'lonDefDomain'}:$domainDescription:$domainTabExtras\n";
   if ($lonCluster eq 'standalone') {    if ($lonCluster eq 'standalone') {
     open(OUT,'&gt;../'.$lonCluster.'_hosts.tab') or      open(OUT,'&gt;../'.$lonCluster.'_hosts.tab') or
       die('file generation error');        die('file generation error');
Line 676  END Line 681  END
        close(OUT);         close(OUT);
       `ln -s new_${lonCluster}_hosts.tab ../hosts.tab`;        `ln -s new_${lonCluster}_hosts.tab ../hosts.tab`;
       # email appropriate message        # email appropriate message
       system('ping -c 1 www.lon-capa.org > /dev/null || ping -c 1 www.msu.edu > /dev/null || ping -c 1 www.mit.edu > /dev/null');        system('ping -c 1 -W 5 www.lon-capa.org > /dev/null || ping -c 1 -W 5 www.msu.edu > /dev/null || ping -c 1 -W 5 www.mit.edu > /dev/null');
       `echo "REPLACE:$lonCluster:$lonHostID:$date:$line2insert" | mail -s "REPLACE:$lonCluster:$lonHostID:$date" installrecord\@mail.lon-capa.org` unless $?;        `echo "REPLACE:$lonCluster:$lonHostID:$date:$line2insert" | mail -s "REPLACE:$lonCluster:$lonHostID:$date" installrecord\@mail.lon-capa.org` unless $?;
     }      }
     elsif ($hostidexistflag and $lineexistflag) {      elsif ($hostidexistflag and $lineexistflag) {
Line 729  END Line 734  END
        close(OUT);         close(OUT);
       `ln -s new_${lonCluster}_domain.tab ../domain.tab`;        `ln -s new_${lonCluster}_domain.tab ../domain.tab`;
       # email appropriate message        # email appropriate message
       system('ping -c 1 www.lon-capa.org > /dev/null || ping -c 1 www.msu.edu > /dev/null || ping -c 1 www.mit.edu > /dev/null');        system('ping -c 1 -W 5 www.lon-capa.org > /dev/null || ping -c 1 -W 5 www.msu.edu > /dev/null || ping -c 1 -W 5 www.mit.edu > /dev/null');
       `echo "REPLACEdom:$lonCluster:$lonHostID:$date:$domaninsert" | mail -s "REPLACEdom:$lonCluster:$lonHostID:$date" installrecord\@mail.lon-capa.org` unless $?;        `echo "REPLACEdom:$lonCluster:$lonHostID:$date:$domaninsert" | mail -s "REPLACEdom:$lonCluster:$lonHostID:$date" installrecord\@mail.lon-capa.org` unless $?;
     }      }
     elsif ($domainexistflag and $lineexistflag) {      elsif ($domainexistflag and $lineexistflag) {

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


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