Match RHEL Beta release strings
RHEL7 (in beta) has "Beta" after the release number and before the code-name. Add a number-match to the regex so everything between that match and the codename in parenthesis is considered the release. Change-Id: I992f20eedcefc6aeed6bd3ad57fc4cf20c8ef15d
This commit is contained in:
parent
ba3c636404
commit
be2ff9a745
@ -422,6 +422,7 @@ GetOSVersion() {
|
||||
os_CODENAME=$(lsb_release -c -s)
|
||||
elif [[ -r /etc/redhat-release ]]; then
|
||||
# Red Hat Enterprise Linux Server release 5.5 (Tikanga)
|
||||
# Red Hat Enterprise Linux Server release 7.0 Beta (Maipo)
|
||||
# CentOS release 5.5 (Final)
|
||||
# CentOS Linux release 6.0 (Final)
|
||||
# Fedora release 16 (Verne)
|
||||
@ -430,7 +431,7 @@ GetOSVersion() {
|
||||
for r in "Red Hat" CentOS Fedora XenServer; do
|
||||
os_VENDOR=$r
|
||||
if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then
|
||||
ver=`sed -e 's/^.* \(.*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`
|
||||
ver=`sed -e 's/^.* \([0-9].*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`
|
||||
os_CODENAME=${ver#*|}
|
||||
os_RELEASE=${ver%|*}
|
||||
os_UPDATE=${os_RELEASE##*.}
|
||||
|
Loading…
Reference in New Issue
Block a user