From 59eaa6545045c8d4d15bf061c506c8f4659f78f3 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Fri, 9 Feb 2018 12:44:31 +0100 Subject: [PATCH] pgsql: fix possible bashism Quote grep regexp to prevent possible shell expansion and fix bashism warning: possible bashism in pgsql line 1949 ([^] should be [!]): echo "$OCF_RESKEY_replication_slot_name" | grep -q -e [^a-z0-9_] --- heartbeat/pgsql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heartbeat/pgsql b/heartbeat/pgsql index 3ded3ca2e5..c487537559 100755 --- a/heartbeat/pgsql +++ b/heartbeat/pgsql @@ -1946,7 +1946,7 @@ pgsql_validate_all() { return $OCF_ERR_CONFIGURED fi - echo "$OCF_RESKEY_replication_slot_name" | grep -q -e [^a-z0-9_] + echo "$OCF_RESKEY_replication_slot_name" | grep -q -e '[^a-z0-9_]' if [ $? -eq 0 ]; then ocf_exit_reason "Invalid replication_slot_name($OCF_RESKEY_replication_slot_name). only use lower case letters, numbers, and the underscore character." return $OCF_ERR_CONFIGURED