dracut/0148-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch

29 lines
1.0 KiB
Diff
Raw Normal View History

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