Added OR statement for cases of ID = rhel in RHEL 7+

Signed-off-by: Hartnell Foster <hartnell.foster@bbc.co.uk>
This commit is contained in:
Hartnell Foster 2016-05-09 12:42:56 +01:00
parent 972765f90f
commit 0395c47c64

View File

@ -137,8 +137,9 @@ if [ "${CPE_NAME}" != "" -a "${ID}" = "centos" -a "${VERSION_ID}" != "" ]
then then
centos_host_ver=${VERSION_ID} centos_host_ver=${VERSION_ID}
is_centos=true is_centos=true
elif [ "${CPE_NAME}" != "" -a "${ID}" = "redhat" -a "${VERSION_ID}" != "" ] elif [ "${CPE_NAME}" != "" -a "${ID}" = "redhat" -o "${ID}" = "rhel" -a "${VERSION_ID}" != "" ]
then then
# RHEL 7+ /etc/os-release ID = 'rhel', which doesn't enter this elif without the added OR statement
redhat_host_ver=${VERSION_ID} redhat_host_ver=${VERSION_ID}
is_redhat=true is_redhat=true
elif [ -e /etc/centos-release ] elif [ -e /etc/centos-release ]