[LON-CAPA-cvs] cvs: doc /loncapafiles sanitycheck.piml
harris41
lon-capa-cvs@mail.lon-capa.org
Tue, 07 Jan 2003 21:12:55 -0000
harris41 Tue Jan 7 16:12:55 2003 EDT
Modified files:
/doc/loncapafiles sanitycheck.piml
Log:
BUG 1085 FIXED. A common redhat glitch (due to anaconda installation code
I think) is fixed; /etc/hosts is monitored, should have 2 or more
non-commented lines.
Index: doc/loncapafiles/sanitycheck.piml
diff -u doc/loncapafiles/sanitycheck.piml:1.11 doc/loncapafiles/sanitycheck.piml:1.12
--- doc/loncapafiles/sanitycheck.piml:1.11 Fri Dec 13 18:15:50 2002
+++ doc/loncapafiles/sanitycheck.piml Tue Jan 7 16:12:54 2003
@@ -3,7 +3,7 @@
<!-- sanitycheck.piml -->
<!-- Scott Harrison -->
-<!-- $Id: sanitycheck.piml,v 1.11 2002/12/13 23:15:50 albertel Exp $ -->
+<!-- $Id: sanitycheck.piml,v 1.12 2003/01/07 21:12:54 harris41 Exp $ -->
<!--
@@ -32,6 +32,33 @@
<piml>
<targetroot>/</targetroot>
<files>
+<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>
<perlscript mode='fg'>