Blame 0038-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch

Harald Hoyer b94732
From a3a2266046299ef4cfed48ce3a2e6bb573ee0dc7 Mon Sep 17 00:00:00 2001
Harald Hoyer b94732
From: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Date: Thu, 11 Dec 2014 15:45:59 +0100
Harald Hoyer b94732
Subject: [PATCH] 95iscsi: Set correct iscsi_started value for iSCSI firmware
Harald Hoyer b94732
Harald Hoyer b94732
When iSCSI firmware booting is selected we should not rely on
Harald Hoyer b94732
'netroot' or 'iscsiroot' variables to be set.
Harald Hoyer b94732
Harald Hoyer b94732
References: bnc#873448
Harald Hoyer b94732
Harald Hoyer b94732
Signed-off-by: Hannes Reinecke <hare@suse.de>
Harald Hoyer b94732
Signed-off-by: Thomas Renninger <trenn@suse.de>
Harald Hoyer b94732
---
Harald Hoyer b94732
 modules.d/95iscsi/parse-iscsiroot.sh | 8 ++++++--
Harald Hoyer b94732
 1 file changed, 6 insertions(+), 2 deletions(-)
Harald Hoyer b94732
Harald Hoyer b94732
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
Harald Hoyer b94732
index ca57668..85c3027 100755
Harald Hoyer b94732
--- a/modules.d/95iscsi/parse-iscsiroot.sh
Harald Hoyer b94732
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
Harald Hoyer b94732
@@ -90,8 +90,12 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the
Harald Hoyer b94732
     fi
Harald Hoyer b94732
 fi
Harald Hoyer b94732
 
Harald Hoyer b94732
-netroot_enc=$(str_replace "$netroot" '/' '\2f')
Harald Hoyer b94732
-echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
Harald Hoyer b94732
+if [ -n "$iscsi_firmware" ] ; then
Harald Hoyer b94732
+    echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
Harald Hoyer b94732
+else
Harald Hoyer b94732
+    netroot_enc=$(str_replace "$netroot" '/' '\2f')
Harald Hoyer b94732
+    echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
Harald Hoyer b94732
+fi
Harald Hoyer b94732
 
Harald Hoyer b94732
 # Done, all good!
Harald Hoyer b94732
 rootok=1