Add rhel to DISTRO match
Match RHEL and CentOS and provide them as a DISTRO prefix of "rhel"
Change-Id: Ida19130ce9499d4d1fd2360fadc6b870b24bbc95
diff --git a/functions b/functions
index edc4bf9..445af5f 100644
--- a/functions
+++ b/functions
@@ -408,6 +408,9 @@
else
DISTRO="sle${os_RELEASE}sp${os_UPDATE}"
fi
+ elif [[ "$os_VENDOR" =~ (Red Hat) || "$os_VENDOR" =~ (CentOS) ]]; then
+ # Drop the . release as we assume it's compatible
+ DISTRO="rhel${os_RELEASE::1}"
else
# Catch-all for now is Vendor + Release + Update
DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE"
@@ -440,7 +443,6 @@
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || [ "$os_VENDOR" = "CentOS" ]
}
-
# Determine if current distribution is a SUSE-based distribution
# (openSUSE, SLE).
# is_suse