cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/master to ca86034
Date Mon, 09 Nov 2015 15:55:49 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master ac00c50b4 -> ca860348d


CLOUDSTACK-9029: Proper support to identify CentOS 7 version number


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3ce420c3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3ce420c3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3ce420c3

Branch: refs/heads/master
Commit: 3ce420c367363202cac4e4f5f59aac23d32defc7
Parents: f65dec4
Author: Carles Figuerola <Carles.Figuerola@orbitz.com>
Authored: Wed Nov 4 11:21:47 2015 -0600
Committer: Carles Figuerola <Carles.Figuerola@orbitz.com>
Committed: Wed Nov 4 11:21:47 2015 -0600

----------------------------------------------------------------------
 python/lib/cloud_utils.py          | 2 +-
 python/lib/cloudutils/utilities.py | 2 +-
 scripts/vm/hypervisor/versions.sh  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ce420c3/python/lib/cloud_utils.py
----------------------------------------------------------------------
diff --git a/python/lib/cloud_utils.py b/python/lib/cloud_utils.py
index 243bb40..598614f 100644
--- a/python/lib/cloud_utils.py
+++ b/python/lib/cloud_utils.py
@@ -68,7 +68,7 @@ elif os.path.exists("/etc/redhat-release"):
     version = file("/etc/redhat-release").readline()
     if version.find("Red Hat Enterprise Linux Server release 6") != -1:
         distro = RHEL6
-    elif version.find("CentOS release") != -1:
+    elif version.find("CentOS") != -1:
         distro = CentOS
     else:
         distro = CentOS

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ce420c3/python/lib/cloudutils/utilities.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py
index 88e2d1c..19dc7ed 100755
--- a/python/lib/cloudutils/utilities.py
+++ b/python/lib/cloudutils/utilities.py
@@ -114,7 +114,7 @@ class Distribution:
                 self.distro = "RHEL6"
             elif version.find("Red Hat Enterprise Linux Server release 7") != -1:
                 self.distro = "RHEL7"
-            elif version.find("CentOS release") != -1:
+            elif version.find("CentOS") != -1:
                 self.distro = "CentOS"
             else:
                 self.distro = "RHEL5"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ce420c3/scripts/vm/hypervisor/versions.sh
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/versions.sh b/scripts/vm/hypervisor/versions.sh
index 159e78e..5d8ff3c 100755
--- a/scripts/vm/hypervisor/versions.sh
+++ b/scripts/vm/hypervisor/versions.sh
@@ -32,7 +32,7 @@ CODENAME=""
 if [ -f /etc/redhat-release ] ; then
 	DIST=`cat /etc/redhat-release | awk '{print $1}'`
 	CODENAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//`
-	REV=`cat /etc/redhat-release | awk '{print $3}'`
+	REV=`cat /etc/redhat-release | awk '{print $3,$4}' | grep -o "[0-9.]*"`
 elif [ -f /etc/lsb-release ] ; then
 	DIST=`cat /etc/lsb-release | grep DISTRIB_ID | tr "\n" ' '| sed s/.*=//`
 	REV=`cat /etc/lsb-release | grep DISTRIB_RELEASE | tr "\n" ' '| sed s/.*=//`


Mime
View raw message