]> 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>
Tue, 25 Aug 2015 09:14:38 +0000 (11:14 +0200)
otherwise it does not get called, if no netroot is set

modules.d/95iscsi/iscsiroot.sh

index b7370f6f1819622b5388f2312f05ddb17dea0cd9..7688b28224bdaa6f2d5391f4355268e49348cac8 100755 (executable)
@@ -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