From 534d5f6bb5dd3d8e9cb2256e75ed182d6530a892 Mon Sep 17 00:00:00 2001 From: Beni Ruef Date: Fri, 4 Dec 2020 14:31:04 +0100 Subject: [PATCH] [type/__postgres_conf] Fix errors found by ShellCheck --- cdist/conf/type/__postgres_conf/gencode-remote | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cdist/conf/type/__postgres_conf/gencode-remote b/cdist/conf/type/__postgres_conf/gencode-remote index a09e1873..e25514d0 100755 --- a/cdist/conf/type/__postgres_conf/gencode-remote +++ b/cdist/conf/type/__postgres_conf/gencode-remote @@ -20,8 +20,8 @@ # along with cdist. If not, see . # -os=$(cat "${__global}/explorer/os") -state_should=$(cat "${__object}/parameter/state") +os=$(cat "${__global:?}/explorer/os") +state_should=$(cat "${__object:?}/parameter/state") if [ "${state_should}" != 'present' ] && [ "${state_should}" != 'absent' ] then @@ -37,7 +37,7 @@ then fi # Parameters -conf_name="${__object_id}" +conf_name="${__object_id:?}" if [ -f "${__object}/parameter/value" ] then conf_value=$(cat "${__object}/parameter/value") @@ -46,7 +46,6 @@ fi if [ "${state_should}" = 'present' ] then set_command="ALTER SYSTEM SET ${conf_name} = '${conf_value}'" - check_command="SHOW ${conf_name}" else set_command="ALTER SYSTEM SET ${conf_name} = DEFAULT" fi