From 8d2b3a202f06bd7cd8055fbe3d5ef7e547d6bb14 Mon Sep 17 00:00:00 2001 From: mslifcak Date: Wed, 31 May 2017 09:40:39 -0400 Subject: A250 2 (#398) * fix missing ROOTDIR prefix * sort list of services before processing * sort list of certificates before processing * sort list of startup scripts before processing * spell check * remove possessive pronoun --- include/tests_boot_services | 4 ++-- include/tests_crypto | 2 +- include/tests_scheduling | 4 ++-- include/tests_snmp | 2 +- include/tests_webservers | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/tests_boot_services b/include/tests_boot_services index 6705ebf3..e9797405 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -634,7 +634,7 @@ if [ -d ${DIR} ]; then LogText "Result: directory ${DIR} found" LogText "Test: checking for available files in directory" - FIND=$(${FINDBINARY} ${DIR} -type f -print) + FIND=$(${FINDBINARY} ${DIR} -type f -print | ${SORTBINARY}) if [ ! -z "${FIND}" ]; then LogText "Result: found files in directory, checking permissions now" for FILE in ${FIND}; do @@ -658,7 +658,7 @@ for NO in 0 1 2 3 4 5 6; do LogText "Test: Checking ${ROOTDIR}etc/rc${NO}.d scripts for writable bit" if [ -d ${ROOTDIR}etc/rc${NO}.d ]; then - FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc${NO}.d -type f -print) + FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc${NO}.d -type f -print | ${SORTBINARY}) for I in ${FIND}; do if IsWorldWritable ${I}; then FOUND=1 diff --git a/include/tests_crypto b/include/tests_crypto index 7ae300f1..968cfce3 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -44,7 +44,7 @@ if [ ${CANREAD} -eq 1 ]; then LogText "Result: found directory ${DIR}" # Search for CRT files - sFINDCRTS=$(${FINDBINARY} ${DIR} -type f 2> /dev/null | ${EGREPBINARY} ".crt$|.pem$|^cert") + sFINDCRTS=$(${FINDBINARY} ${DIR} -type f 2> /dev/null | ${EGREPBINARY} ".crt$|.pem$|^cert" | ${SORTBINARY}) if [ ! -z "${sFINDCRTS}" ]; then for FILE in ${sFINDCRTS}; do FileIsReadable ${FILE} diff --git a/include/tests_scheduling b/include/tests_scheduling index 33f1f8a1..d17e0a74 100644 --- a/include/tests_scheduling +++ b/include/tests_scheduling @@ -56,7 +56,7 @@ BAD_FILE_PERMISSIONS=0 BAD_FILE_OWNERSHIP=0 FindCronJob() { - sCRONJOBS=$(${EGREPBINARY} '^([0-9*])' $1 | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',') + sCRONJOBS=$(${EGREPBINARY} '^([0-9*])' $1 | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',' | ${SORTBINARY}) } CRONTAB_FILE="${ROOTDIR}etc/crontab" @@ -163,7 +163,7 @@ if [ "${OS}" = "Linux" ]; then if [ -f /etc/anacrontab ]; then LogText "Test: checking anacrontab" - sANACRONJOBS=$(${EGREPBINARY} '^([0-9@])' /etc/anacrontab | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',') + sANACRONJOBS=$(${EGREPBINARY} '^([0-9@])' /etc/anacrontab | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',' | ${SORTBINARY}) if [ ! -z "${sANACRONJOBS}" ]; then Report "scheduler[]=anacron" for I in ${sANACRONJOBS}; do diff --git a/include/tests_snmp b/include/tests_snmp index 3398efa3..6b5011c3 100644 --- a/include/tests_snmp +++ b/include/tests_snmp @@ -65,7 +65,7 @@ LogText "Result: No snmpd configuration found" Display --indent 4 --text "- Checking SNMP configuration" --result "${STATUS_NOT_FOUND}" --color WHITE else - LogText "Restult: using last found configuration file: ${SNMP_DAEMON_CONFIG}" + LogText "Result: using last found configuration file: ${SNMP_DAEMON_CONFIG}" Display --indent 4 --text "- Checking SNMP configuration" --result "${STATUS_FOUND}" --color GREEN fi fi diff --git a/include/tests_webservers b/include/tests_webservers index c7ceef1b..72dccd5e 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -31,7 +31,7 @@ APACHE_MODULES_ENABLED_LOCS="${ROOTDIR}etc/apache2/mods-enabled" APACHE_MODULES_LOCS="${ROOTDIR}etc/httpd/modules ${ROOTDIR}opt/local/apache2/modules ${ROOTDIR}usr/lib/apache2 ${ROOTDIR}usr/lib/httpd/modules ${ROOTDIR}usr/libexec/apache2 ${ROOTDIR}usr/lib64/apache2 ${ROOTDIR}usr/lib64/apache2/modules ${ROOTDIR}usr/lib64/httpd/modules ${ROOTDIR}usr/local/libexec/apache ${ROOTDIR}usr/local/libexec/apache22" NGINX_RUNNING=0 - NGINX_CONF_LOCS="${ROOTDIR}etc/nginx ${ROOTDIR}usr/local/etc/nginx usr/local/nginx/conf" + NGINX_CONF_LOCS="${ROOTDIR}etc/nginx ${ROOTDIR}usr/local/etc/nginx ${ROOTDIR}usr/local/nginx/conf" NGINX_CONF_LOCATION="" NGINX_CONF_FILES="" NGINX_CONF_FILES_ADDITIONS="" @@ -561,7 +561,7 @@ Display --indent 8 --text "- Debugging mode on error_log" --result "${STATUS_YES}" --color RED AddHP 2 3 else - LogText "Result: no virtual hosts found which have their their error log in debug mode" + LogText "Result: no virtual hosts found which have their error log in debug mode" Display --indent 8 --text "- Debugging mode on error_log" --result "${STATUS_NO}" --color GREEN AddHP 3 3 fi -- cgit v1.2.3