CLOUDSTACK-8443: detect CentOS 7.x as RHEL 7 alike

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

Branch: refs/heads/master
Commit: 0a320c18d4450e36b0fedacb237a5ed5f465a7b8
Parents: b29ffa2
Author: Remi Bergsma <[email protected]>
Authored: Sat Aug 22 22:30:46 2015 +0200
Committer: Remi Bergsma <[email protected]>
Committed: Mon Aug 24 15:51:14 2015 +0200

----------------------------------------------------------------------
 python/lib/cloudutils/utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a320c18/python/lib/cloudutils/utilities.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/utilities.py 
b/python/lib/cloudutils/utilities.py
index 88e2d1c..762c69b 100755
--- a/python/lib/cloudutils/utilities.py
+++ b/python/lib/cloudutils/utilities.py
@@ -112,7 +112,7 @@ class Distribution:
             version = file("/etc/redhat-release").readline()
             if version.find("Red Hat Enterprise Linux Server release 6") != -1 
or version.find("Scientific Linux release 6") != -1 or version.find("CentOS 
Linux release 6") != -1 or version.find("CentOS release 6.") != -1:
                 self.distro = "RHEL6"
-            elif version.find("Red Hat Enterprise Linux Server release 7") != 
-1:
+            elif version.find("Red Hat Enterprise Linux Server release 7") != 
-1 or version.find("Scientific Linux release 7") != -1 or version.find("CentOS 
Linux release 7") != -1 or version.find("CentOS release 7.") != -1:
                 self.distro = "RHEL7"
             elif version.find("CentOS release") != -1:
                 self.distro = "CentOS"

Reply via email to