From 49713a7ea1d30613a8810b85eca8ab35f6e9fa8a Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 28 May 2020 08:26:47 -0400 Subject: common-ha: ganesha-ha.sh bad test for {rhel,centos} for pcs options bash [[ ... =~ ... ]] built-in returns _0_ when the regex matches, not 1, thus the sense of the test is backwards and never correctly detects rhel or centos. master commit: eaf126f4b06a842977c1932ce699c4d76421a4b2 Change-Id: Ic9e60aae4ea38aff8f13979080995e60621a68fe Fixes: #1269 Signed-off-by: Kaleb S. KEITHLEY --- extras/ganesha/scripts/ganesha-ha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index df333a19f94..c562bea4779 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -1053,7 +1053,7 @@ main() # Fedora 29+ and rhel/centos 8 has PCS-0.10.x # default is pcs-0.10.x options but check for # rhel/centos 7 (pcs-0.9.x) and adjust accordingly - if [[ ${ID} =~ {rhel,centos} ]]; then + if [[ ! ${ID} =~ {rhel,centos} ]]; then if [[ ${VERSION_ID} == 7.* ]]; then PCS9OR10_PCS_CNAME_OPTION="--name" PCS9OR10_PCS_CLONE_OPTION="--clone" -- cgit