17b94a
From f880df2ce4706dd748a09d3d6db57d49f62a234c Mon Sep 17 00:00:00 2001
17b94a
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
17b94a
Date: Thu, 28 May 2020 08:26:47 -0400
17b94a
Subject: [PATCH 383/383] common-ha: ganesha-ha.sh bad test for {rhel,centos}
17b94a
 for pcs options
17b94a
17b94a
bash [[ ... =~ ... ]] built-in returns _0_ when the regex matches,
17b94a
not 1, thus the sense of the test is backwards and never correctly
17b94a
detects rhel or centos.
17b94a
17b94a
https://review.gluster.org/#/c/glusterfs/+/24502/
17b94a
17b94a
Change-Id: Ic9e60aae4ea38aff8f13979080995e60621a68fe
17b94a
BUG: 1840794
17b94a
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/201686
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 extras/ganesha/scripts/ganesha-ha.sh | 2 +-
17b94a
 1 file changed, 1 insertion(+), 1 deletion(-)
17b94a
17b94a
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
17b94a
index 4ecf91b..a6814b1 100644
17b94a
--- a/extras/ganesha/scripts/ganesha-ha.sh
17b94a
+++ b/extras/ganesha/scripts/ganesha-ha.sh
17b94a
@@ -1054,7 +1054,7 @@ main()
17b94a
         # Fedora 29+ and rhel/centos 8 has PCS-0.10.x
17b94a
         # default is pcs-0.10.x options but check for
17b94a
         # rhel/centos 7 (pcs-0.9.x) and adjust accordingly
17b94a
-        if [[ ${ID} =~ {rhel,centos} ]]; then
17b94a
+        if [[ ! ${ID} =~ {rhel,centos} ]]; then
17b94a
             if [[ ${VERSION_ID} == 7.* ]]; then
17b94a
                 PCS9OR10_PCS_CNAME_OPTION="--name"
17b94a
                 PCS9OR10_PCS_CLONE_OPTION="--clone"
17b94a
-- 
17b94a
1.8.3.1
17b94a