[ewg] [PATCH ofed-1.2]: Don't install OFED if iSER was selected and open-iscsi is already installed

Erez Zilber erezz at voltaire.com
Thu Mar 1 08:57:33 PST 2007


Vlad,

The following patch checks that no open-iscsi version is already installed when installing OFED and selecting ib_iser.

--- build_env.sh.orig	2007-03-01 15:37:54.000000000 +0200
+++ build_env.sh	2007-03-01 18:52:29.000000000 +0200
@@ -2289,6 +2294,7 @@
 {
         # Check dependencies and print Warning messages
         local req_status=0
+        local iscsi_err=0
         
         touch ${rpms_cache}
 
@@ -2300,6 +2306,24 @@
                 package_var=$(echo -n ${package} | sed -e 's/-/_/g')
                 check_run_req $package_var err
                 let req_status=$req_status+$?
+
+                if [ "${package}" == "open-iscsi" ]; then
+                    case ${DISTRIBUTION} in
+                        SuSE)
+                        open_iscsi_rpm_name=${OPEN_ISCSI_SUSE_NAME}
+                        ;;
+                        redhat5)
+                        open_iscsi_rpm_name=${OPEN_ISCSI_REDHAT_NAME}
+                        ;;
+                    esac
+
+                    $RPM -q ${open_iscsi_rpm_name} > $NULL 2>&1
+                    iscsi_err=$?
+                    if [ ${iscsi_err} -eq 0 ]; then
+                        err_echo "Please uninstall ${open_iscsi_rpm_name} before installing OFED."
+                        let req_status=$req_status+1
+                    fi
+                fi
         done
         
         # Exit if there is missing required software for mandatory packages
-- 
____________________________________________________________

Erez Zilber   |  972-9-971-7689

Software Engineer, Storage Team

Voltaire – _The Grid Backbone_

 __

 www.voltaire.com <http://www.voltaire.com/>

<mailto:g at voltaire.com>

  





More information about the ewg mailing list