Blame 0031-iscsi-module-setup.sh-only-install-s390-driver-on-s3.patch

Harald Hoyer d1bf89
From 4f9f76cd629cfe7c31586eb2bfd0d4c61322db86 Mon Sep 17 00:00:00 2001
Harald Hoyer d1bf89
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer d1bf89
Date: Mon, 18 Jun 2012 13:26:55 +0200
Harald Hoyer d1bf89
Subject: [PATCH] iscsi/module-setup.sh: only install s390 driver on s390 arch
Harald Hoyer d1bf89
Harald Hoyer d1bf89
---
Harald Hoyer d1bf89
 modules.d/95iscsi/module-setup.sh |    5 ++++-
Harald Hoyer d1bf89
 1 file changed, 4 insertions(+), 1 deletion(-)
Harald Hoyer d1bf89
Harald Hoyer d1bf89
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
Harald Hoyer d1bf89
index bfd9d73..fefc240 100755
Harald Hoyer d1bf89
--- a/modules.d/95iscsi/module-setup.sh
Harald Hoyer d1bf89
+++ b/modules.d/95iscsi/module-setup.sh
Harald Hoyer d1bf89
@@ -37,6 +37,8 @@ depends() {
Harald Hoyer d1bf89
 }
Harald Hoyer d1bf89
 
Harald Hoyer d1bf89
 installkernel() {
Harald Hoyer d1bf89
+    local _arch=$(uname -m)
Harald Hoyer d1bf89
+
Harald Hoyer d1bf89
     instmods iscsi_tcp iscsi_ibft crc32c bnx2i iscsi_boot_sysfs qla4xxx cxgb3i cxgb4i be2iscsi
Harald Hoyer d1bf89
     iscsi_module_filter() {
Harald Hoyer d1bf89
         local _iscsifuncs='iscsi_register_transport'
Harald Hoyer d1bf89
@@ -47,8 +49,9 @@ installkernel() {
Harald Hoyer d1bf89
             *.ko.xz) [[ $(xz -dc   <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
Harald Hoyer d1bf89
             esac
Harald Hoyer d1bf89
         done
Harald Hoyer d1bf89
+        return 0;
Harald Hoyer d1bf89
     }
Harald Hoyer d1bf89
-    { find_kernel_modules_by_path drivers/scsi; find_kernel_modules_by_path drivers/s390/scsi; } \
Harald Hoyer d1bf89
+    { find_kernel_modules_by_path drivers/scsi; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/scsi; fi;} \
Harald Hoyer d1bf89
     | iscsi_module_filter  |  instmods
Harald Hoyer d1bf89
 }
Harald Hoyer d1bf89