[Rivet-svn] rivet: Use lsb_release to acquire RedHat/SL version

Rivet Mercurial rivet at projects.hepforge.org
Thu Mar 17 21:15:02 GMT 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/f5be4d40521e
branches:  release-2-4-x
changeset: 5022:f5be4d40521e
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Mar 17 21:06:18 2016 +0000
description:
Use lsb_release to acquire RedHat/SL version

diffs (15 lines):

--- a/m4/lcg.m4	Sat Mar 12 21:39:24 2016 +0000
+++ b/m4/lcg.m4	Thu Mar 17 21:06:18 2016 +0000
@@ -15,10 +15,10 @@
     if `echo $distribution | grep -i "Linux" &> /dev/null`; then os=LINUX; fi
     if test -e "/etc/redhat-release"; then
       distribution="redhat"
-      sltest=`cat /etc/redhat-release | grep "Scientific Linux" 2> /dev/null`
+      sltest=`lsb_release -is | grep "Scientific" 2> /dev/null`
       if test -n "$sltest"; then
         os=SLC
-        sl_version=`cat /etc/redhat-release | cut -f5 -d" "`
+        sl_version=`lsb_release -rs`
         sl_major=`echo $sl_version | cut -f1 -d.`
         distribution="slc${sl_major}"
       fi


More information about the Rivet-svn mailing list