[LON-CAPA-cvs] cvs: loncom /build CHECKRPMS distprobe

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Thu, 28 Jun 2007 13:30:07 -0000


raeburn		Thu Jun 28 09:30:07 2007 EDT

  Modified files:              
    /loncom/build	distprobe CHECKRPMS 
  Log:
  Include CentOS and Scientific Linux as supported distros.
  
  
Index: loncom/build/distprobe
diff -u loncom/build/distprobe:1.13 loncom/build/distprobe:1.14
--- loncom/build/distprobe:1.13	Thu May 31 09:36:53 2007
+++ loncom/build/distprobe	Thu Jun 28 09:30:06 2007
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network with CAPA
 #
-# $Id: distprobe,v 1.13 2007/05/31 13:36:53 raeburn Exp $
+# $Id: distprobe,v 1.14 2007/06/28 13:30:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -53,6 +53,10 @@
         $dist = 'rhes'.$1;
     } elsif ($versionstring =~ /Red Hat Enterprise Linux Server release (\d+)/) {
         $dist = 'rhes'.$1;
+    } elsif ($versionstring =~ /CentOS release (\d+)/) {
+        $dist = 'centos'.$1;
+    } elsif ($versionstring =~ /Scientific Linux SL release ([\d\.]+) /) {
+        $dist = 'scientific'.$1;
     } else {
         warn('Unable to interpret /etc/redhat-release '.
              'to determine system type');
Index: loncom/build/CHECKRPMS
diff -u loncom/build/CHECKRPMS:1.7 loncom/build/CHECKRPMS:1.8
--- loncom/build/CHECKRPMS:1.7	Mon Apr 23 16:04:52 2007
+++ loncom/build/CHECKRPMS	Thu Jun 28 09:30:06 2007
@@ -39,7 +39,7 @@
 
 The utility which is used to complete the check depends on the distro:
 
-fedora, rhel 5/5+ - yum
+fedora, rhel 5/5+, centos, scientific - yum
 suse 9.X and sles9 - you
 suse 10.X and sles10 - rug
 rhel 4 - up2date
@@ -99,6 +99,14 @@
         &prepare_msg($tmpfile,$cmd);
         ($send,$addsubj) = &check_with_yum($tmpfile);
     }
+} elsif ($distro =~ /^centos\d+$/) {
+    $cmd = 'yum update';
+    &prepare_msg($tmpfile,$cmd);
+    ($send,$addsubj) = &check_with_yum($tmpfile);
+} elsif ($distro =~ /^scientific\d+\.\d$/) {
+    $cmd = 'yum update';
+    &prepare_msg($tmpfile,$cmd);
+    ($send,$addsubj) = &check_with_yum($tmpfile);
 } else {
     $cmd = '/usr/local/bin/check-rpms --update';
     ($send,$addsubj) = &check_with_checkrpms($tmpfile);