Blame SOURCES/0347-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch

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