Blame 0148-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch
|
Harald Hoyer |
bb31e7 |
From 79cb273dc081598ea0dec4734ee0413491f7c45e Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
bb31e7 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
bb31e7 |
Date: Thu, 17 Sep 2015 15:41:12 +0200
|
|
Harald Hoyer |
bb31e7 |
Subject: [PATCH] iscsi/parse-iscsiroot.sh: correct handling if netroot isn't
|
|
Harald Hoyer |
bb31e7 |
set
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
corrects bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
(cherry picked from commit 7fd112f20e63def6d274ab445b5eb82138348901)
|
|
Harald Hoyer |
bb31e7 |
---
|
|
Harald Hoyer |
bb31e7 |
modules.d/95iscsi/parse-iscsiroot.sh | 4 +++-
|
|
Harald Hoyer |
bb31e7 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
Harald Hoyer |
bb31e7 |
index 63a822f..971bab2 100755
|
|
Harald Hoyer |
bb31e7 |
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
|
Harald Hoyer |
bb31e7 |
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
Harald Hoyer |
bb31e7 |
@@ -82,7 +82,9 @@ if [ -n "$iscsi_firmware" ]; then
|
|
Harald Hoyer |
bb31e7 |
initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
|
|
Harald Hoyer |
bb31e7 |
fi
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
-[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1
|
|
Harald Hoyer |
bb31e7 |
+if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then
|
|
Harald Hoyer |
bb31e7 |
+ return 1
|
|
Harald Hoyer |
bb31e7 |
+fi
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"
|
|
Harald Hoyer |
bb31e7 |
|