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

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