Whamcloud - gitweb
b=20744 remedial fix for inkernel ofed handling
authorVitaly Fertman <vitaly.fertman@sun.com>
Thu, 21 Oct 2010 23:27:19 +0000 (03:27 +0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Thu, 21 Oct 2010 23:32:34 +0000 (03:32 +0400)
o=brian
i=yangsheng
i=yibin.wang

It seems that the patch to add inkernel handling for SLES10's OFED introduced a
bug for other inkernel uses.  This fixes that bug.

build/lbuild

index ab6c725..9177661 100755 (executable)
@@ -1335,19 +1335,25 @@ build_ofed() {
 
     # if an ofed version is given, then it means use OFED proper,
     # not any vendor specific "inkernel" version
 
     # if an ofed version is given, then it means use OFED proper,
     # not any vendor specific "inkernel" version
-    if [ -z "$ofed_version" -o "$ofed_version" = "inkernel" ]; then
-        # first see if there is a distro specific override for this
-        # XXX we need to better integrate an distro specific override with
+    if [ -z "$ofed_version" ]; then
+        return 0
+    fi
+
+    if [ "$ofed_version" = "inkernel" ]; then
+        # see if there is a distro specific override for this and use
+        # that if it exists
+        # XXX we need to better integrate a distro specific override with
         #     the rest of this function so that all of the reuse cache
         #     stuff is leveraged given that 80% of this function is reuse
         if type -p build_ofed-${DISTRO}; then
             local ofed_location
             ofed_location=$(build_ofed-${DISTRO} ${STDOUT})
         #     the rest of this function so that all of the reuse cache
         #     stuff is leveraged given that 80% of this function is reuse
         if type -p build_ofed-${DISTRO}; then
             local ofed_location
             ofed_location=$(build_ofed-${DISTRO} ${STDOUT})
+            local rc=${PIPESTATUS[0]}
             CONFIGURE_FLAGS="--with-o2ib=${ofed_location} ${CONFIGURE_FLAGS}"
             CONFIGURE_FLAGS="--with-o2ib=${ofed_location} ${CONFIGURE_FLAGS}"
-            return ${PIPESTATUS[0]}
+            return $rc
+        else
+            return 0
         fi
         fi
-    else
-        return 0
     fi
 
     # build kernel-ib
     fi
 
     # build kernel-ib