From 79786e5cc9b6bf702bc5dbde1aa0826986dbef8e Mon Sep 17 00:00:00 2001 From: Justin Pasher Date: Fri, 30 Aug 2024 11:17:46 -0500 Subject: [PATCH 1/2] Wrap quotes properly for dash and other(?) shells --- include/tests_webservers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_webservers b/include/tests_webservers index 4d56e1a8..14cff59c 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -323,7 +323,7 @@ Display --indent 4 --text " ${APACHE_CONFFILE}" --result "${STATUS_NOT_FOUND}" --color WHITE else TRACEENABLED_SETTING=$( echo ${TRACEENABLE} | tr 'A-Z' 'a-z' ) - if [ x${TRACEENABLED_SETTING} == x'off' ]; then + if [ "x${TRACEENABLED_SETTING}" == 'xoff' ]; then LogText "Result: found TraceEnable setting set to 'off' in ${APACHE_CONFFILE}" Report "Apache setting: 'TraceEnable Off' in ${APACHE_CONFFILE}" Display --indent 4 --text " ${APACHE_CONFFILE}" --result "${STATUS_FOUND}" --color GREEN From dc9d3606a4be3420ad80df931dd2cae0bd159445 Mon Sep 17 00:00:00 2001 From: Justin Pasher Date: Fri, 30 Aug 2024 12:38:13 -0500 Subject: [PATCH 2/2] Needs to be single = for POSIX sh --- include/tests_webservers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_webservers b/include/tests_webservers index 14cff59c..c0cfc5df 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -323,7 +323,7 @@ Display --indent 4 --text " ${APACHE_CONFFILE}" --result "${STATUS_NOT_FOUND}" --color WHITE else TRACEENABLED_SETTING=$( echo ${TRACEENABLE} | tr 'A-Z' 'a-z' ) - if [ "x${TRACEENABLED_SETTING}" == 'xoff' ]; then + if [ "x${TRACEENABLED_SETTING}" = 'xoff' ]; then LogText "Result: found TraceEnable setting set to 'off' in ${APACHE_CONFFILE}" Report "Apache setting: 'TraceEnable Off' in ${APACHE_CONFFILE}" Display --indent 4 --text " ${APACHE_CONFFILE}" --result "${STATUS_FOUND}" --color GREEN