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