version 1.7, 2002/09/22 08:32:46
|
version 1.12, 2003/01/07 21:12:54
|
Line 33 http://www.lon-capa.org/
|
Line 33 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> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
unless |
unless |
Line 52 else # It exists, so look at the file me
|
Line 79 else # It exists, so look at the file me
|
{ |
{ |
print('**** ERROR **** <TARGET /> should be owned by'. |
print('**** ERROR **** <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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
else # Check permissions on the file to make sure it is private to www. |
else # Check permissions on the file to make sure it is private to www. |
{ |
{ |
Line 64 else # It exists, so look at the file me
|
Line 91 else # It exists, so look at the file me
|
print('**** ERROR **** '. |
print('**** ERROR **** '. |
'<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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
$smode=~/^..(..)$/; |
$smode=~/^..(..)$/; |
$wflag=$1; |
$wflag=$1; |
Line 74 else # It exists, so look at the file me
|
Line 101 else # It exists, so look at the file me
|
print('**** ERROR **** '. |
print('**** ERROR **** '. |
'<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 /var/lib/mysql/mysql.sock'."\n". |
'chown www:www <TARGET />'."\n". |
'chmod a-rwx,u+rwx /var/lib/mysql/mysql.sock'."\n"); |
'chmod a-rwx,u+rwx <TARGET />'."\n"); |
} |
} |
} |
} |
} |
} |
Line 122 my $dbug=0;
|
Line 149 my $dbug=0;
|
my $sbug=0; |
my $sbug=0; |
my $fbug=0; |
my $fbug=0; |
while (<IN>) { |
while (<IN>) { |
|
next if (/^(\#|\s*$)/); |
if (/\S/) { |
if (/\S/) { |
$rbug=1 if /\r/; |
$rbug=1 if /\r/; |
my @a=split(/\:/,$_); |
my @a=split(/\:/,$_); |