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

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