Support RHEL with lsb_release
Consider all distributor as "Red Hat" which id matches to the Red.*Hat regexp.
Example Distributor ID: "RedHatEnterpriseServer"
Change-Id: I29cc2e83cccaafa3e1e056e506fda5c9771764a1
diff --git a/functions b/functions
index 80e1796..55a81c5 100644
--- a/functions
+++ b/functions
@@ -224,6 +224,7 @@
os_VENDOR=$(lsb_release -i -s)
os_RELEASE=$(lsb_release -r -s)
os_UPDATE=""
+ os_PACKAGE="rpm"
if [[ "Debian,Ubuntu" =~ $os_VENDOR ]]; then
os_PACKAGE="deb"
elif [[ "SUSE LINUX" =~ $os_VENDOR ]]; then
@@ -231,9 +232,8 @@
if [[ $? -eq 0 ]]; then
os_VENDOR="openSUSE"
fi
- os_PACKAGE="rpm"
- else
- os_PACKAGE="rpm"
+ elif [[ $os_VENDOR =~ Red.*Hat ]]; then
+ os_VENDOR="Red Hat"
fi
os_CODENAME=$(lsb_release -c -s)
elif [[ -r /etc/redhat-release ]]; then