Diff for /doc/loncapafiles/sanitycheck.piml between versions 1.14 and 1.51

version 1.14, 2003/05/27 13:16:44 version 1.51, 2024/06/20 04:04:55
Line 60  else Line 60  else
 </file>  </file>
 <file>  <file>
 <target dist='default'>/var/lib/mysql/mysql.sock</target>  <target dist='default'>/var/lib/mysql/mysql.sock</target>
   <target dist='suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 sles12 sles15'>/var/run/mysql/mysql.sock</target>
   <target dist='debian5 debian6 debian10 debian11 debian12 ubuntu6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20 ubuntu22 ubuntu24'>/var/run/mysqld/mysqld.sock</target>
 <perlscript mode='fg'>  <perlscript mode='fg'>
 unless  unless
     (-e '<TARGET />') # Does file exist?      (-e '<TARGET />') # Does file exist?
   {    {
     print("**** ERROR **** Missing <TARGET />\n");      print("**** ERROR **** Missing <TARGET />\n");
   }    }
   <!-- Commented out by Matthew since MySQL insists on doing things its own way
 else # It exists, so look at the file metadata more closely.  else # It exists, so look at the file metadata more closely.
   {    {
     my @s = stat('<TARGET />');      my @s = stat('<TARGET />');
Line 105  else # It exists, so look at the file me Line 108  else # It exists, so look at the file me
   }    }
       }        }
   }    }
    -->
 </perlscript>  </perlscript>
 </file>  </file>
 <file>  <file>
 <target dist='default'>/etc/httpd/conf/loncapa.conf</target>  <target dist='default'>/etc/httpd/conf/loncapa.conf</target>
   <target dist='sles10 sles11 sles12 sles15 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 debian10 debian11 debian12 ubuntu6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20 ubuntu22 ubuntu24'>/etc/apache2/loncapa.conf</target>
 <perlscript mode='fg'>  <perlscript mode='fg'>
 open IN, "&lt;<TARGET />";  open IN, "&lt;<TARGET />";
 my $hbug=-1;  my $hbug=-1;
Line 117  while (&lt;IN&gt;) { Line 122  while (&lt;IN&gt;) {
  if (/PerlSetVar\s+lonHostID\s+(\S+)/) {   if (/PerlSetVar\s+lonHostID\s+(\S+)/) {
   my $v=$1;    my $v=$1;
   $hbug=0;    $hbug=0;
   $hbug=1 if $v=~/\W/;    $hbug=1 if $v=~/[^\w.\-]/;
   $hbug=1 if $v=~/\_/;    $hbug=1 if $v=~/_/;
  }   }
  if (/PerlSetVar\s+lonDefDomain\s+(\S+)/) {   if (/PerlSetVar\s+lonDefDomain\s+(\S+)/) {
   my $v=$1;    my $v=$1;
   $dbug=0;    $dbug=0;
   $dbug=1 if $v=~/\W/;    $dbug=1 if $v=~/[^\w.\-]/;
   $dbug=1 if $v=~/\_/;    $dbug=1 if $v=~/_/;
   # Avoid namespace conflicts under the web server's DocumentRoot.    # Avoid namespace conflicts under the web server's DocumentRoot.
   my @badnames=('raw','userfiles','priv','adm','uploaded');    my @badnames=('raw','userfiles','priv','adm','uploaded');
   foreach my $bad (@badnames) {    foreach my $bad (@badnames) {
Line 147  my $rbug=0; Line 152  my $rbug=0;
 my $dbug=0;  my $dbug=0;
 my $sbug=0;  my $sbug=0;
 my $fbug=0;  my $fbug=0;
 while (&lt;IN&gt;) {  my %line;
  next if (/^(\#|\s*$)/);  my $line=0;
  if (/\S/) {  while (my $l = &lt;IN&gt;) {
   $rbug=1 if /\r/;   $line++;
   my @a=split(/\:/,$_);   next if ($l=~/^(\#|\s*$)/);
   $dbug=1 if $a[0]=~/\W/;   if ($l=~/^\^/) {
   $dbug=1 if $a[0]=~/\_/;    if ($l !~ /^\^[\w.\-]/) {
   $dbug=1 if $a[1]=~/\_/;      $dns_bug = 1;
   $dbug=1 if $a[1]=~/\W/;      push(@{$line{'dns'}},$line);
   $fbug=1 if (@a<5 || @a>6);    }
    } elsif ($l=~/\S/) {
     if ($l=~/\r/) {              $rbug=1; push(@{$line{'r'}},$line); }
     my @a=split(/:/,$l);
     if ($a[0]=~/[^\w\-.]/ ||
         $a[1]=~/[^\w\-.]/ ||
         $a[0]=~/\_/       ||
         $a[1]=~/\_/      ) { $dbug=1; push(@{$line{'d'}},$line); }
     if (@a<6 || @a>6) {      $fbug=1; push(@{$line{'f'}},$line); }
   my $expr='\s.+$';    my $expr='\s.+$';
   $sbug=1 if ($a[0] =~ /$expr/ ||    if ($a[0] =~ /$expr/ ||
       $a[1] =~ /$expr/ ||        $a[1] =~ /$expr/ ||
       $a[2] =~ /$expr/ ||        $a[2] =~ /$expr/ ||
       $a[3] =~ /$expr/ ||        $a[3] =~ /$expr/ ) { $sbug=1; push(@{$line{'s'}},$line); }
       $a[4] =~ /$expr/ )  
 ;  ;
  }   }
 }  }
 close IN;  close IN;
 if ($rbug) {  if ($rbug) {
   print "**** ERROR **** <TARGET /> is DOS-formatted\n";    print "**** ERROR **** <TARGET /> is DOS-formatted (lines ".join(', ',@{$line{'r'}}).")\n";
 }  }
 if ($dbug) {  if ($dbug) {
   print "**** ERROR **** <TARGET /> has invalid host id or domain id\n";    print "**** ERROR **** <TARGET /> has invalid host id or domain id (lines ".join(', ',@{$line{'d'}}).")\n";
 }  }
 if ($fbug) {  if ($fbug) {
   print "**** ERROR **** <TARGET /> is lacking 5 or 6 columns for every row\n";    print "**** ERROR **** <TARGET /> is lacking 6 columns for every row (lines ".join(', ',@{$line{'f'}}).")\n";
 }  }
 if ($sbug) {  if ($sbug) {
   print "**** ERROR **** <TARGET /> has illegal whitespace character\n";    print "**** ERROR **** <TARGET /> has illegal whitespace character (lines ".join(', ',@{$line{'s'}}).")\n";
   }
   if ($dns_bug) {
     print "**** ERROR **** <TARGET /> host.tab server entry has characters (lines ".join(', ',@{$line{'dns'}}).")\n";
 }  }
 </file>  </file>
 <file>  <file>
Line 186  open IN, "&lt;<TARGET />"; Line 201  open IN, "&lt;<TARGET />";
 my $rbug=0;  my $rbug=0;
 my $dbug=0;  my $dbug=0;
 my $sbug=0;  my $sbug=0;
 while (&lt;IN&gt;) {  while (my $line = &lt;IN&gt;) {
  if (/\S/) {   if ($line =~ /\S/) {
   $rbug=1 if /\r/;    $rbug=1 if $line=~/\r/;
   $dbug=1 if $_=~/\W.*\n$/;    if ($line =~ /\W.*\n/) {
   $dbug=1 if $_=~/\_/;   $dbug=$line if ($line !~/\w:(?:primary|default)$/);
   $sbug=1 if /\s.+$/;    }
     $dbug=$line if $line=~/\_/;
     $sbug=1 if $line=~/\s.+$/;
  }   }
 }  }
 close IN;  close IN;
Line 199  if ($rbug) { Line 216  if ($rbug) {
   print "**** ERROR **** <TARGET /> is DOS-formatted\n";    print "**** ERROR **** <TARGET /> is DOS-formatted\n";
 }  }
 if ($dbug) {  if ($dbug) {
   print "**** ERROR **** <TARGET /> has invalid host id\n";    print "**** ERROR **** <TARGET /> has invalid host id ($dbug)\n";
 }  }
 if ($sbug) {  if ($sbug) {
   print "**** ERROR **** <TARGET /> has illegal whitespace character\n";    print "**** ERROR **** <TARGET /> has illegal whitespace character\n";

Removed from v.1.14  
changed lines
  Added in v.1.51


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