Whamcloud - gitweb
LU-9236 kernel: new kernel RHEL 6.9 [2.6.32-696.el6]
[fs/lustre-release.git] / contrib / lbuild / funcs.sh
index e57e5bf..91b6f49 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,7 @@ autodetect_target() {
     case ${distro} in
           oel5*)  target="2.6-oel5";;
          rhel5*)  target="2.6-rhel5";;
+         rhel6.9) target="2.6-rhel6.9";;
          rhel6.8) target="2.6-rhel6.8";;
          rhel6.7) target="2.6-rhel6.7";;
          rhel6.6) target="2.6-rhel6.6";;