You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.7 KiB

From 9bdbbe90efb11dfb840f9e9de0daf6388fa0f47f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 17 Jan 2014 14:45:15 +0100
Subject: [PATCH] iscsi: call "iscsistart -b" until it succeeds
---
modules.d/95iscsi/iscsiroot.sh | 11 ++++++++++-
modules.d/95iscsi/parse-iscsiroot.sh | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
index abdea5cf..156003c0 100755
--- a/modules.d/95iscsi/iscsiroot.sh
+++ b/modules.d/95iscsi/iscsiroot.sh
@@ -45,11 +45,20 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
done
if ! [ -e /tmp/iscsistarted-firmware ]; then
- iscsistart -b $iscsi_param
+ if ! iscsistart -f | vinfo; then
+ warn "iscistart: Could not get list of targets from firmware."
+ exit 1
+ fi
+
+ if ! iscsistart -b $iscsi_param 2>&1 | vinfo; then
+ warn "\`iscsistart -b $iscsi_param\´ failed"
+ exit 1
+ fi
echo 'started' > "/tmp/iscsistarted-iscsi"
echo 'started' > "/tmp/iscsistarted-firmware"
need_shutdown
fi
+
[ "$netif" = dummy ] && exit 0
fi
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index 77bd9913..e463addb 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi}
modprobe -q iscsi_boot_sysfs 2>/dev/null
modprobe -q iscsi_ibft
- initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
+ initqueue --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi
# If it's not iscsi we don't continue