Blame SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch

712866
From 12aa314819f2b1067442e8a7aa5d3f36301b7f47 Mon Sep 17 00:00:00 2001
712866
From: Hannes Reinecke <hare@suse.de>
712866
Date: Thu, 25 Feb 2016 20:58:12 +0800
712866
Subject: [PATCH] 95iscsi: More empty cmdline fixes
712866
712866
This fixes up some 95iscsi/module-setup.sh which might print out empty
712866
commandline files.
712866
712866
Signed-off-by: Hannes Reinecke <hare@suse.de>
712866
Signed-off-by: Thomas Renninger <trenn@suse.de>
712866
---
712866
 modules.d/95iscsi/module-setup.sh | 13 +++++++------
712866
 1 file changed, 7 insertions(+), 6 deletions(-)
712866
712866
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
5c6c2a
index 181da3c7..64c9c1d1 100755
712866
--- a/modules.d/95iscsi/module-setup.sh
712866
+++ b/modules.d/95iscsi/module-setup.sh
712866
@@ -75,12 +75,6 @@ depends() {
712866
 installkernel() {
712866
     local _arch=$(uname -m)
712866
 
712866
-    # Detect iBFT and perform mandatory steps
712866
-    if [[ $hostonly_cmdline == "yes" ]] ; then
712866
-        install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf"
712866
-        echo >> "${initdir}/etc/cmdline.d/95iscsi.conf"
712866
-    fi
712866
-
712866
     instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
712866
     hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
712866
     iscsi_module_filter() {
712866
@@ -129,6 +123,13 @@ install() {
712866
     inst_multiple umount iscsistart hostname iscsi-iname
712866
     inst_multiple -o iscsiuio
712866
     inst_libdir_file 'libgcc_s.so*'
712866
+
712866
+    # Detect iBFT and perform mandatory steps
712866
+    if [[ $hostonly_cmdline == "yes" ]] ; then
712866
+        local _ibftconf=$(install_ibft)
712866
+        [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
712866
+    fi
712866
+
712866
     inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
712866
     inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
712866
     inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"