From d857f4b4a4af2ed468c219d24da9d98416aff5d1 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 20 Mar 2013 14:51:06 +1100 Subject: [PATCH] Add rhel to DISTRO match Match RHEL and CentOS and provide them as a DISTRO prefix of "rhel" Change-Id: Ida19130ce9499d4d1fd2360fadc6b870b24bbc95 --- functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions b/functions index edc4bf9aef..445af5fa57 100644 --- a/functions +++ b/functions @@ -408,6 +408,9 @@ function GetDistro() { 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 @@ function is_fedora { [ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || [ "$os_VENDOR" = "CentOS" ] } - # Determine if current distribution is a SUSE-based distribution # (openSUSE, SLE). # is_suse