GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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
Filter options
  • python/lib
    • cloud_utils.py
    • cloudutils
      • utilities.py
  • scripts/vm/hypervisor
    • versions.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python/lib/cloud_utils.py‎

Copy file name to clipboardExpand all lines: python/lib/cloud_utils.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
version = file("/etc/redhat-release").readline()
6969
if version.find("Red Hat Enterprise Linux Server release 6") != -1:
7070
distro = RHEL6
71-
elif version.find("CentOS release") != -1:
71+
elif version.find("CentOS") != -1:
7272
distro = CentOS
7373
else:
7474
distro = CentOS
Collapse file

‎python/lib/cloudutils/utilities.py‎

Copy file name to clipboardExpand all lines: python/lib/cloudutils/utilities.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self):
114114
self.distro = "RHEL6"
115115
elif version.find("Red Hat Enterprise Linux Server release 7") != -1:
116116
self.distro = "RHEL7"
117-
elif version.find("CentOS release") != -1:
117+
elif version.find("CentOS") != -1:
118118
self.distro = "CentOS"
119119
else:
120120
self.distro = "RHEL5"
Collapse file

‎scripts/vm/hypervisor/versions.sh‎

Copy file name to clipboardExpand all lines: scripts/vm/hypervisor/versions.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ CODENAME=""
3232
if [ -f /etc/redhat-release ] ; then
3333
DIST=`cat /etc/redhat-release | awk '{print $1}'`
3434
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.]*"`
3636
elif [ -f /etc/lsb-release ] ; then
3737
DIST=`cat /etc/lsb-release | grep DISTRIB_ID | tr "\n" ' '| sed s/.*=//`
3838
REV=`cat /etc/lsb-release | grep DISTRIB_RELEASE | tr "\n" ' '| sed s/.*=//`

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.