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