Blame SOURCES/0035-RH-mpathconf-fix-setting-property_blacklist.patch

da32ae
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
da32ae
From: Benjamin Marzinski <bmarzins@redhat.com>
da32ae
Date: Mon, 13 Dec 2021 14:26:30 -0600
da32ae
Subject: [PATCH] RH: mpathconf: fix setting property_blacklist
da32ae
da32ae
If there was no blacklist_exceptions section, setting property_blacklist
da32ae
didn't work correctly. Fix it.
da32ae
da32ae
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
da32ae
---
da32ae
 multipath/mpathconf | 10 +++++++++-
da32ae
 1 file changed, 9 insertions(+), 1 deletion(-)
da32ae
da32ae
diff --git a/multipath/mpathconf b/multipath/mpathconf
da32ae
index c00d2555..0de6b121 100644
da32ae
--- a/multipath/mpathconf
da32ae
+++ b/multipath/mpathconf
da32ae
@@ -496,7 +496,15 @@ if [ "$PROPERTY" = "n" ]; then
da32ae
 		CHANGED_CONFIG=1
da32ae
 	fi
da32ae
 elif [ "$PROPERTY" = "y" ]; then
da32ae
-	if [ -z "$HAVE_PROPERTY" ]; then
da32ae
+	if [ -z "$HAVE_PROPERTY" -a -z "$HAVE_EXCEPTIONS" ]; then
da32ae
+		cat >> $TMPFILE << _EOF_
da32ae
+
da32ae
+blacklist_exceptions {
da32ae
+	property "(SCSI_IDENT_|ID_WWN)"
da32ae
+}
da32ae
+_EOF_
da32ae
+		CHANGED_CONFIG=1
da32ae
+	elif [ -z "$HAVE_PROPERTY" ]; then
da32ae
 		sed -i '/^blacklist_exceptions[[:space:]]*{/ a\
da32ae
 	property "(SCSI_IDENT_|ID_WWN)"
da32ae
 ' $TMPFILE