Blame 0041-95iscsi-More-empty-cmdline-fixes.patch

Harald Hoyer b94732
From 54e28d79b9f67b8be349ae97f92dde2c6c118e11 Mon Sep 17 00:00:00 2001
Harald Hoyer b94732
From: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Date: Thu, 11 Dec 2014 15:46:02 +0100
Harald Hoyer b94732
Subject: [PATCH] 95iscsi: More empty cmdline fixes
Harald Hoyer b94732
Harald Hoyer b94732
This fixes up some 95iscsi/module-setup.sh which might print out empty
Harald Hoyer b94732
commandline files.
Harald Hoyer b94732
Harald Hoyer b94732
Signed-off-by: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Signed-off-by: Thomas Renninger <trenn@suse.de>
Harald Hoyer b94732
---
Harald Hoyer b94732
 modules.d/95iscsi/module-setup.sh | 13 +++++++------
Harald Hoyer b94732
 1 file changed, 7 insertions(+), 6 deletions(-)
Harald Hoyer b94732
Harald Hoyer b94732
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
Harald Hoyer b94732
index d30e64f..29bba82 100755
Harald Hoyer b94732
--- a/modules.d/95iscsi/module-setup.sh
Harald Hoyer b94732
+++ b/modules.d/95iscsi/module-setup.sh
Harald Hoyer b94732
@@ -76,12 +76,6 @@ depends() {
Harald Hoyer b94732
 installkernel() {
Harald Hoyer b94732
     local _arch=$(uname -m)
Harald Hoyer b94732
 
Harald Hoyer b94732
-    # Detect iBFT and perform mandatory steps
Harald Hoyer b94732
-    if [[ $hostonly_cmdline == "yes" ]] ; then
Harald Hoyer b94732
-        install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf"
Harald Hoyer b94732
-        echo >> "${initdir}/etc/cmdline.d/95iscsi.conf"
Harald Hoyer b94732
-    fi
Harald Hoyer b94732
-
Harald Hoyer b94732
     instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
Harald Hoyer b94732
     hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
Harald Hoyer b94732
     iscsi_module_filter() {
Harald Hoyer b94732
@@ -131,6 +125,13 @@ install() {
Harald Hoyer b94732
     inst_multiple umount iscsistart hostname iscsi-iname
Harald Hoyer b94732
     inst_multiple -o iscsiuio
Harald Hoyer b94732
     inst_libdir_file 'libgcc_s.so*'
Harald Hoyer b94732
+
Harald Hoyer b94732
+    # Detect iBFT and perform mandatory steps
Harald Hoyer b94732
+    if [[ $hostonly_cmdline == "yes" ]] ; then
Harald Hoyer b94732
+        local _ibftconf=$(install_ibft)
Harald Hoyer b94732
+        [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
Harald Hoyer b94732
+    fi
Harald Hoyer b94732
+
Harald Hoyer b94732
     inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
Harald Hoyer b94732
     inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
Harald Hoyer b94732
     inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"