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

raeburn raeburn@source.lon-capa.org
Sat, 08 May 2010 18:20:56 -0000


raeburn		Sat May  8 18:20:56 2010 EDT

  Modified files:              
    /loncom/build	distprobe 
  Log:
  - Eliminate minor version number for distro reported for Scientific Linux.
  
  
Index: loncom/build/distprobe
diff -u loncom/build/distprobe:1.16 loncom/build/distprobe:1.17
--- loncom/build/distprobe:1.16	Sun Jul  5 23:58:38 2009
+++ loncom/build/distprobe	Sat May  8 18:20:56 2010
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network with CAPA
 #
-# $Id: distprobe,v 1.16 2009/07/05 23:58:38 raeburn Exp $
+# $Id: distprobe,v 1.17 2010/05/08 18:20:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -55,8 +55,10 @@
         $dist = 'rhes'.$1;
     } elsif ($versionstring =~ /CentOS release (\d+)/) {
         $dist = 'centos'.$1;
-    } elsif ($versionstring =~ /Scientific Linux SL release ([\d\.]+) /) {
-        $dist = 'scientific'.$1;
+    } elsif ($versionstring =~ /Scientific Linux SL release ([\d.]+) /) {
+        my $ver = $1;
+        $ver =~ s/\.\d+$//;
+        $dist = 'scientific'.$ver;
     } else {
         warn('Unable to interpret /etc/redhat-release '.
              'to determine system type');