]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95iscsi: More empty cmdline fixes
authorHannes Reinecke <hare@suse.de>
Thu, 11 Dec 2014 14:46:02 +0000 (15:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Dec 2014 12:29:36 +0000 (13:29 +0100)
This fixes up some 95iscsi/module-setup.sh which might print out empty
commandline files.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
modules.d/95iscsi/module-setup.sh

index d30e64f6a3f00f1d20f4bd4ebf98b32c6ca24f5c..29bba82414ad73ab99bd469270b9e2d2687379a0 100755 (executable)
@@ -76,12 +76,6 @@ depends() {
 installkernel() {
     local _arch=$(uname -m)
 
-    # Detect iBFT and perform mandatory steps
-    if [[ $hostonly_cmdline == "yes" ]] ; then
-        install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf"
-        echo >> "${initdir}/etc/cmdline.d/95iscsi.conf"
-    fi
-
     instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
     hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
     iscsi_module_filter() {
@@ -131,6 +125,13 @@ install() {
     inst_multiple umount iscsistart hostname iscsi-iname
     inst_multiple -o iscsiuio
     inst_libdir_file 'libgcc_s.so*'
+
+    # Detect iBFT and perform mandatory steps
+    if [[ $hostonly_cmdline == "yes" ]] ; then
+        local _ibftconf=$(install_ibft)
+        [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
+    fi
+
     inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
     inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
     inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"