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