]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
iscsi/iscsiroot.sh: handle firmware in online queue
authorHarald Hoyer <harald@redhat.com>
Tue, 25 Aug 2015 09:14:38 +0000 (11:14 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 14:21:19 +0000 (15:21 +0100)
otherwise it does not get called, if no netroot is set

(cherry picked from commit 3bd3bbec319eccd28145f77e42b83b479286ff34)

modules.d/95iscsi/iscsiroot.sh

index ad958129b2146a7e9d2acc4858a9ee5cfc0dce21..893f279b4b4a4ae90ad9f3ba1051c33bc8c6fbba 100755 (executable)
@@ -236,28 +236,26 @@ if [ "$netif" = "dummy" ] && 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