[LON-CAPA-cvs] cvs: doc /loncapafiles rpmcheck.piml

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 19 May 2004 16:45:20 -0000


matthew		Wed May 19 12:45:20 2004 EDT

  Modified files:              
    /doc/loncapafiles	rpmcheck.piml 
  Log:
  Added checks for required packages (psutils) and required files (pstops).
  
  
Index: doc/loncapafiles/rpmcheck.piml
diff -u doc/loncapafiles/rpmcheck.piml:1.1 doc/loncapafiles/rpmcheck.piml:1.2
--- doc/loncapafiles/rpmcheck.piml:1.1	Wed May 19 12:31:07 2004
+++ doc/loncapafiles/rpmcheck.piml	Wed May 19 12:45:20 2004
@@ -3,7 +3,7 @@
 <!-- phpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: rpmcheck.piml,v 1.1 2004/05/19 16:31:07 matthew Exp $ -->
+<!-- $Id: rpmcheck.piml,v 1.2 2004/05/19 16:45:20 matthew Exp $ -->
 
 <!--
 
@@ -35,6 +35,8 @@
 <file>
 <target dist="default">/home/httpd/lonUsers</target>
 <perlscript mode="fg">
+#
+# Look for php packages that should not be installed
 my @phprpms = `rpm -q -a|grep php`;
 if (@phprpms) {
     print "WARNING: PHP packages are present on this system.\n".
@@ -47,9 +49,10 @@
     }
     print "\n";
 }
+#
+# Look for mod_* that are thought to conflict with LON-CAPA
 my @mod_rpms = `rpm -q -a | grep mod`;
 foreach my $rpm (@mod_rpms) {
-#    next if ($rpm =~ /^mod_perl/);
     if ($rpm =~ /mod_bandwidth/) {
         print "WARNING: it appears you have the mod_bandwidth ".
         "package installed.\n".
@@ -57,7 +60,7 @@
         "Use the following command to remove it:\n".
         "rpm -e $rpm\n";
     }
-    if ($rpm =~ /throttle/) {
+    if ($rpm =~ /mod_throttle/) {
         print "WARNING: it appears you have the mod_throttle ".
         "package installed.\n".
         "mod_throttle appears to conflict with LON-CAPA.\n".
@@ -65,6 +68,21 @@
         "rpm -e $rpm\n";
     }
         
+}
+#
+# Look for packages which we need to be present
+foreach my $rpm ('psutils') {
+    my @RPMs = `rpm -q -a | grep $rpm`;
+    if (! @RPMs) {
+        print "WARNING: ".$rpm." does not appear to be installed.\n";
+    }
+}
+#
+# Look for files which we need to be present
+foreach my $file ('/usr/bin/pstops') {
+    if (! -e $file) {
+        print "WARNING: ".$file." does not appear to be installed.\n";
+    }
 }
 </perlscript>
 </file>