Whamcloud - gitweb
LU-8900 mgs: use reference count for fs_db
[fs/lustre-release.git] / contrib / lbuild / funcs.sh
index b06095d..b3e033f 100644 (file)
@@ -138,12 +138,18 @@ autodetect_distro() {
             "RedHatEnterpriseServer" | "ScientificSL" | "CentOS")
                 name="rhel"
                 ;;
-            "SUSE LINUX")
-                name="sles"
-               PATCHLEVEL=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
-               if [ "$PATCHLEVEL" -ne "0" ]; then
-                       version="${version}.$PATCHLEVEL"
-               fi
+           "SUSE LINUX" | "SUSE")
+               name="sles"
+               case "$version" in
+               *.*)    # $version already has patchlevel
+                       ;;
+               *)      # add patchlevel
+                       PATCHLEVEL=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
+                       if [ "$PATCHLEVEL" -ne "0" ]; then
+                               version="${version}.$PATCHLEVEL"
+                       fi
+                       ;;
+               esac
                ;;
             "Fedora")
                 name="fc"
@@ -186,6 +192,8 @@ autodetect_target() {
     case ${distro} in
           oel5*)  target="2.6-oel5";;
          rhel5*)  target="2.6-rhel5";;
+         rhel6.8) target="2.6-rhel6.8";;
+         rhel6.7) target="2.6-rhel6.7";;
          rhel6.6) target="2.6-rhel6.6";;
          rhel6*)  target="2.6-rhel6";;
          rhel7*)  target="3.10-rhel7";;