Browse code

Add rhel to DISTRO match

Match RHEL and CentOS and provide them as a DISTRO prefix of "rhel"

Change-Id: Ida19130ce9499d4d1fd2360fadc6b870b24bbc95

Ian Wienand authored on 2013/03/20 12:51:06
Showing 1 changed files
... ...
@@ -408,6 +408,9 @@ function GetDistro() {
408 408
         else
409 409
             DISTRO="sle${os_RELEASE}sp${os_UPDATE}"
410 410
         fi
411
+    elif [[ "$os_VENDOR" =~ (Red Hat) || "$os_VENDOR" =~ (CentOS) ]]; then
412
+        # Drop the . release as we assume it's compatible
413
+        DISTRO="rhel${os_RELEASE::1}"
411 414
     else
412 415
         # Catch-all for now is Vendor + Release + Update
413 416
         DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE"
... ...
@@ -440,7 +443,6 @@ function is_fedora {
440 440
     [ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || [ "$os_VENDOR" = "CentOS" ]
441 441
 }
442 442
 
443
-
444 443
 # Determine if current distribution is a SUSE-based distribution
445 444
 # (openSUSE, SLE).
446 445
 # is_suse