Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2017-03-27 13:23:27 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-03-27 13:23:27 +0300
commite14376cdab8465a59c828fd8a93c00ee28d07ce8 (patch)
tree09e3805d0175a0dfbf1a3bc197dd34af37664ddf /include/tests_tooling
parentb306ab891f8710dc99069e3c2116ddc2c885c90c (diff)
Minor cleanups
Diffstat (limited to 'include/tests_tooling')
-rw-r--r--include/tests_tooling16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/tests_tooling b/include/tests_tooling
index 348e0306..43cef10c 100644
--- a/include/tests_tooling
+++ b/include/tests_tooling
@@ -50,7 +50,7 @@
Display --indent 2 --text "- Checking automation tooling"
# Cfengine
- if [ ! "${CFAGENTBINARY}" = "" ]; then
+ if [ ! -z "${CFAGENTBINARY}" ]; then
LogText "Result: CFEngine (cfagent) is installed (${CFAGENTBINARY})"
AUTOMATION_TOOL_FOUND=1
CFENGINE_AGENT_FOUND=1
@@ -126,14 +126,14 @@
fi
# SaltStack
- if [ ! "${SALTMINIONBINARY}" = "" ]; then
+ if [ ! -z "${SALTMINIONBINARY}" ]; then
LogText "Result: SaltStack (salt-minion) is installed (${SALTMINIONBINARY})"
AUTOMATION_TOOL_FOUND=1
SALT_MINION_RUNNING=1
Report "automation_tool_running[]=saltstack-minion"
Display --indent 4 --text "Found: SaltStack minion (salt-minion)" --result "${STATUS_FOUND}" --color GREEN
fi
- if [ ! "${SALTMASTERBINARY}" = "" ]; then
+ if [ ! -z "${SALTMASTERBINARY}" ]; then
LogText "Result: SaltStack (salt-master) is installed (${SALTMASTERBINARY})"
AUTOMATION_TOOL_FOUND=1
SALT_MASTER_RUNNING=1
@@ -170,7 +170,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
# Fail2ban presence
- if [ ! "${FAIL2BANBINARY}" = "" ]; then
+ if [ ! -z "${FAIL2BANBINARY}" ]; then
FAIL2BAN_FOUND=1
IDS_IPS_TOOL_FOUND=1
LogText "Result: Fail2ban is installed (${FAIL2BANBINARY})"
@@ -191,7 +191,7 @@
fi
# Continue if tooling is available and configuration file found
- if [ ${FAIL2BAN_FOUND} -eq 1 -a ! "${FAIL2BAN_CONFIG}" = "" ]; then
+ if [ ${FAIL2BAN_FOUND} -eq 1 -a ! -z "${FAIL2BAN_CONFIG}" ]; then
Report "fail2ban_config=${FAIL2BAN_CONFIG}"
FAIL2BANCLIENT=$(which fail2ban-client 2> /dev/null | grep -v "no [^ ]* in ")
if [ ! -z "${FAIL2BANCLIENT}" ]; then PERFORM_FAIL2BAN_TESTS=1; fi
@@ -206,7 +206,7 @@
Register --test-no TOOL-5104 --weight L --network NO --preqs-met ${PREQS_MET} --category security --description "Enabled tests in Fail2ban"
if [ ${SKIPTEST} -eq 0 ]; then
FIND=$(${FAIL2BANCLIENT} -d | ${TRBINARY} -d '[]' | ${TRBINARY} -d "'" | ${AWKBINARY} -F, '{ if ($1=="add") { print $2 }}' | ${TRBINARY} -d ' ')
- if [ ! "${FIND}" = "" ]; then
+ if [ ! -z "${FIND}" ]; then
for F2BSERVICE in ${FIND}; do
LogText "Result: service '${F2BSERVICE}' enabled"
Report "fail2ban_enabled_service[]=${F2BSERVICE}"
@@ -234,12 +234,12 @@
# FIND=$(${EGREPBINARY} "^action = \%\(action_m.*\)s" ${FAIL2BAN_CONFIG})
# FIND2=$(${EGREPBINARY} "^action = \%\(action_\)s" ${FAIL2BAN_CONFIG})
#
- # if [ ! "${FIND}" = "" ]; then
+ # if [ ! -z "${FIND}" ]; then
# FAIL2BAN_EMAIL=1
# LogText "Result: found at least one jail which sends an email alert"
# fi
#
- # if [ ! "${FIND2}" = "" ]; then
+ # if [ ! -z "${FIND2}" ]; then
# FAIL2BAN_SILENT=1
# LogText "Result: found at least one jail which does NOT send an email alert"
# fi