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

version 1.9, 2002/11/26 15:05:19 version 1.14, 2003/05/27 13:16:44
Line 1 Line 1
 <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN"   <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
  "http://lpml.sourceforge.net/DTD/piml.dtd">   "http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- sanitycheck.piml -->  <!-- sanitycheck.piml -->
 <!-- Scott Harrison -->  
   
 <!-- $Id$ -->  <!-- $Id$ -->
   
Line 33  http://www.lon-capa.org/ Line 32  http://www.lon-capa.org/
 <targetroot>/</targetroot>  <targetroot>/</targetroot>
 <files>  <files>
 <file>  <file>
   <target dist='default'>/etc/hosts</target>
   <perlscript mode='fg'>
   unless
       (-e '<TARGET />') # Does file exist?
     {
       print("**** ERROR **** Missing <TARGET />\n");
     }
   else
     {
       my $numentries = `grep -v '^#' <TARGET /> | grep -c '[[:alpha:]]'`;
       if ($numentries == 1)
         {
           print("**** ERROR **** Malformatted <TARGET />\n");
           print("<TARGET /> typically should have at least two entries, ".
         "e.g.:\n");
    print("127.0.0.1               localhost.localdomain localhost\n");
    print("35.8.63.26              s16.lite.msu.edu s16\n");
           print("The <TARGET /> file on your machine looks like it was \n".
         "messed up due to a common bug with RedHat installations.\n".
         "(This weird bug is RedHat's fault, not LON-CAPA's.)\n");
           print("Please read the man pages about \"hosts\" and fix your\n".
         "<TARGET /> file.\n");
         }
     }
   </perlscript>
   </file>
   <file>
 <target dist='default'>/var/lib/mysql/mysql.sock</target>  <target dist='default'>/var/lib/mysql/mysql.sock</target>
 <target dist='redhat7'>/tmp/mysql.sock</target>  
 <perlscript mode='fg'>  <perlscript mode='fg'>
 unless  unless
     (-e '<TARGET />') # Does file exist?      (-e '<TARGET />') # Does file exist?
Line 51  else # It exists, so look at the file me Line 76  else # It exists, so look at the file me
   
     if ($uid ne $web_uid) # If file owned by someone else other than www.      if ($uid ne $web_uid) # If file owned by someone else other than www.
       {        {
  print('**** ERROR **** <TARGET /> should be owned by'.   print('**** WARNING **** <TARGET /> should be owned by'.
       ' www.'."\n".'Try these commands to make things right:'."\n".        ' www.'."\n".'Try these commands to make things right:'."\n".
       'chown www:www <TARGET />'."\n".        'chown www:www <TARGET />'."\n".
       'chmod a-rwx,u+rwx <TARGET />'."\n");        'chmod a-rwx,u+rwx <TARGET />'."\n");
Line 62  else # It exists, so look at the file me Line 87  else # It exists, so look at the file me
  my $wflag = $1;   my $wflag = $1;
  if ($wflag != 7) # Can www use this socket?  (Hope so!)   if ($wflag != 7) # Can www use this socket?  (Hope so!)
   {    {
     print('**** ERROR **** '.      print('**** WARNING **** '.
       '<TARGET /> should be user "rwx" (by'.        '<TARGET /> should be user "rwx" (by'.
       ' www).'."\n".'Try these commands to make things right:'."\n".        ' www).'."\n".'Try these commands to make things right:'."\n".
       'chown www:www <TARGET />'."\n".        'chown www:www <TARGET />'."\n".
Line 72  else # It exists, so look at the file me Line 97  else # It exists, so look at the file me
  $wflag=$1;   $wflag=$1;
  if ($wflag ne "00") # Can others use this socket?  (Hope not!)   if ($wflag ne "00") # Can others use this socket?  (Hope not!)
   {    {
     print('**** ERROR **** '.      print('**** WARNING **** '.
       '<TARGET /> should not be group or everybody accessible'.        '<TARGET /> should not be group or everybody accessible'.
       '.'."\n".'Try these commands to make things right:'."\n".        '.'."\n".'Try these commands to make things right:'."\n".
       'chown www:www <TARGET />'."\n".        'chown www:www <TARGET />'."\n".
Line 123  my $dbug=0; Line 148  my $dbug=0;
 my $sbug=0;  my $sbug=0;
 my $fbug=0;  my $fbug=0;
 while (&lt;IN&gt;) {  while (&lt;IN&gt;) {
    next if (/^(\#|\s*$)/);
  if (/\S/) {   if (/\S/) {
   $rbug=1 if /\r/;    $rbug=1 if /\r/;
   my @a=split(/\:/,$_);    my @a=split(/\:/,$_);

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


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