X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=contrib%2Flbuild%2Ffuncs.sh;h=b3e033f262f65e841f83eec1c70d218fe2e5aebe;hb=bfa1dbc969df6e9e10579fdb30ab653835463bd2;hp=b06095d187eb1190108bba6d5732fd82df7ac29d;hpb=52aa92420fe9829603bfb98dcda31bf22d995e42;p=fs%2Flustre-release.git diff --git a/contrib/lbuild/funcs.sh b/contrib/lbuild/funcs.sh index b06095d..b3e033f 100644 --- a/contrib/lbuild/funcs.sh +++ b/contrib/lbuild/funcs.sh @@ -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";;