Blob Blame History Raw
From 3bd3bbec319eccd28145f77e42b83b479286ff34 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 25 Aug 2015 11:14:38 +0200
Subject: [PATCH] iscsi/iscsiroot.sh: handle firmware in online queue

otherwise it does not get called, if no netroot is set
---
 modules.d/95iscsi/iscsiroot.sh | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
index b7370f6f..7688b282 100755
--- a/modules.d/95iscsi/iscsiroot.sh
+++ b/modules.d/95iscsi/iscsiroot.sh
@@ -238,28 +238,26 @@ if [ "$netif" = "timeout" ] && all_ifaces_up; then
     sleep 2
 fi
 
-# loop over all netroot parameter
-netroot=$(getarg netroot)
-if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then
-    for nroot in $(getargs netroot); do
-        [ "${nroot%%:*}" = "iscsi" ] || continue
-        nroot="${nroot##iscsi:}"
-        if [ -n "$nroot" ]; then
-            handle_netroot "$nroot"
-            ret=$(($ret + $?))
-        fi
-    done
+if [ "$netif" = "online" ]; then
     if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
         handle_firmware
-        ret=$(($ret + $?))
+        ret=$?
     fi
 else
-    if [ -n "$iroot" ]; then
-        handle_netroot "$iroot"
-        ret=$?
+    # loop over all netroot parameter
+    nroot=$(getarg netroot)
+    if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then
+        for nroot in $(getargs netroot); do
+            [ "${nroot%%:*}" = "iscsi" ] || continue
+            nroot="${nroot##iscsi:}"
+            if [ -n "$nroot" ]; then
+                handle_netroot "$nroot"
+                ret=$(($ret + $?))
+            fi
+        done
     else
-        if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
-            handle_firmware
+        if [ -n "$iroot" ]; then
+            handle_netroot "$iroot"
             ret=$?
         fi
     fi