GeezerVison is showing github.com — CLOUDSTACK-9029: Proper support to identify CentOS 7 version number · bugtrap/cloudstack@3ce420c
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: python/lib/cloud_utils.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
68 | 68 | version = file("/etc/redhat-release").readline() |
69 | 69 | if version.find("Red Hat Enterprise Linux Server release 6") != -1: |
70 | 70 | distro = RHEL6 |
71 | | - elif version.find("CentOS release") != -1: |
| 71 | + elif version.find("CentOS") != -1: |
72 | 72 | distro = CentOS |
73 | 73 | else: |
74 | 74 | distro = CentOS |
|
Collapse file
Copy file name to clipboardExpand all lines: python/lib/cloudutils/utilities.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -114,7 +114,7 @@ def __init__(self): |
114 | 114 | self.distro = "RHEL6" |
115 | 115 | elif version.find("Red Hat Enterprise Linux Server release 7") != -1: |
116 | 116 | self.distro = "RHEL7" |
117 | | - elif version.find("CentOS release") != -1: |
| 117 | + elif version.find("CentOS") != -1: |
118 | 118 | self.distro = "CentOS" |
119 | 119 | else: |
120 | 120 | self.distro = "RHEL5" |
|
Collapse file
Copy file name to clipboardExpand all lines: scripts/vm/hypervisor/versions.sh +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ CODENAME="" |
32 | 32 | if [ -f /etc/redhat-release ] ; then |
33 | 33 | DIST=`cat /etc/redhat-release | awk '{print $1}'` |
34 | 34 | CODENAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//` |
35 | | - REV=`cat /etc/redhat-release | awk '{print $3}'` |
| 35 | + REV=`cat /etc/redhat-release | awk '{print $3,$4}' | grep -o "[0-9.]*"` |
36 | 36 | elif [ -f /etc/lsb-release ] ; then |
37 | 37 | DIST=`cat /etc/lsb-release | grep DISTRIB_ID | tr "\n" ' '| sed s/.*=//` |
38 | 38 | REV=`cat /etc/lsb-release | grep DISTRIB_RELEASE | tr "\n" ' '| sed s/.*=//` |
|