]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95iscsi: Set correct iscsi_started value for iSCSI firmware
authorHannes Reinecke <hare@suse.de>
Thu, 11 Dec 2014 14:45:59 +0000 (15:45 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Dec 2014 12:29:35 +0000 (13:29 +0100)
When iSCSI firmware booting is selected we should not rely on
'netroot' or 'iscsiroot' variables to be set.

References: bnc#873448

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
modules.d/95iscsi/parse-iscsiroot.sh

index ca5766832012f09166a4253d376042dc0128cec7..85c3027dcb8c1cc8f14956887cc747b0dfd5e2ab 100755 (executable)
@@ -90,8 +90,12 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the
     fi
 fi
 
-netroot_enc=$(str_replace "$netroot" '/' '\2f')
-echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+if [ -n "$iscsi_firmware" ] ; then
+    echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+else
+    netroot_enc=$(str_replace "$netroot" '/' '\2f')
+    echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+fi
 
 # Done, all good!
 rootok=1