--- loncom/build/distprobe 2009/07/05 23:58:38 1.16 +++ loncom/build/distprobe 2011/07/21 21:28:29 1.20 @@ -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.20 2011/07/21 21:28:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,10 +53,12 @@ if (-e '/etc/redhat-release') { $dist = 'rhes'.$1; } elsif ($versionstring =~ /Red Hat Enterprise Linux Server release (\d+)/) { $dist = 'rhes'.$1; - } elsif ($versionstring =~ /CentOS release (\d+)/) { + } elsif ($versionstring =~ /CentOS(?:| Linux) 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');