Blame SOURCES/0320-iscsi-iscsiroot.sh-handle-firmware-in-online-queue.patch

18971c
From 3bd3bbec319eccd28145f77e42b83b479286ff34 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Tue, 25 Aug 2015 11:14:38 +0200
18971c
Subject: [PATCH] iscsi/iscsiroot.sh: handle firmware in online queue
18971c
18971c
otherwise it does not get called, if no netroot is set
18971c
---
18971c
 modules.d/95iscsi/iscsiroot.sh | 32 +++++++++++++++-----------------
18971c
 1 file changed, 15 insertions(+), 17 deletions(-)
18971c
18971c
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
18971c
index b7370f6f..7688b282 100755
18971c
--- a/modules.d/95iscsi/iscsiroot.sh
18971c
+++ b/modules.d/95iscsi/iscsiroot.sh
18971c
@@ -238,28 +238,26 @@ if [ "$netif" = "timeout" ] && all_ifaces_up; then
18971c
     sleep 2
18971c
 fi
18971c
 
18971c
-# loop over all netroot parameter
18971c
-netroot=$(getarg netroot)
18971c
-if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then
18971c
-    for nroot in $(getargs netroot); do
18971c
-        [ "${nroot%%:*}" = "iscsi" ] || continue
18971c
-        nroot="${nroot##iscsi:}"
18971c
-        if [ -n "$nroot" ]; then
18971c
-            handle_netroot "$nroot"
18971c
-            ret=$(($ret + $?))
18971c
-        fi
18971c
-    done
18971c
+if [ "$netif" = "online" ]; then
18971c
     if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
18971c
         handle_firmware
18971c
-        ret=$(($ret + $?))
18971c
+        ret=$?
18971c
     fi
18971c
 else
18971c
-    if [ -n "$iroot" ]; then
18971c
-        handle_netroot "$iroot"
18971c
-        ret=$?
18971c
+    # loop over all netroot parameter
18971c
+    nroot=$(getarg netroot)
18971c
+    if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then
18971c
+        for nroot in $(getargs netroot); do
18971c
+            [ "${nroot%%:*}" = "iscsi" ] || continue
18971c
+            nroot="${nroot##iscsi:}"
18971c
+            if [ -n "$nroot" ]; then
18971c
+                handle_netroot "$nroot"
18971c
+                ret=$(($ret + $?))
18971c
+            fi
18971c
+        done
18971c
     else
18971c
-        if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
18971c
-            handle_firmware
18971c
+        if [ -n "$iroot" ]; then
18971c
+            handle_netroot "$iroot"
18971c
             ret=$?
18971c
         fi
18971c
     fi