diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-06-18 12:14:01 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-06-18 12:14:01 +0300 |
commit | 983e293eb157131ca5e085e4927ea5fc220edc73 (patch) | |
tree | cc5e8bea4af5cfa53f57a73d2c61357f47165857 /include/tests_tooling | |
parent | 9c093f7a97fb0b9593a303ef7394c3bc5dea99b2 (diff) |
Replaced text strings to allow translations
Diffstat (limited to 'include/tests_tooling')
-rw-r--r-- | include/tests_tooling | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/include/tests_tooling b/include/tests_tooling index aedd9728..5ee29b8e 100644 --- a/include/tests_tooling +++ b/include/tests_tooling @@ -54,7 +54,7 @@ AUTOMATION_TOOL_FOUND=1 CFENGINE_AGENT_FOUND=1 Report "automation_tool_running[]=cf-agent" - Display --indent 4 --text "Found: Cfengine (cfagent)" --result FOUND --color GREEN + Display --indent 4 --text "Found: Cfengine (cfagent)" --result "${STATUS_FOUND}" --color GREEN fi OTHER_CFENGINE_LOCATIONS="/var/cfengine/bin" for I in ${OTHER_CFENGINE_LOCATIONS}; do @@ -64,7 +64,7 @@ AUTOMATION_TOOL_FOUND=1 CFENGINE_AGENT_FOUND=1 Report "automation_tool_running[]=cf-agent" - Display --indent 4 --text "Found: CFEngine (cf-agent)" --result FOUND --color GREEN + Display --indent 4 --text "Found: CFEngine (cf-agent)" --result "${STATUS_FOUND}" --color GREEN fi IsRunning "cf-server" if [ ${RUNNING} -eq 1 ]; then @@ -72,7 +72,7 @@ AUTOMATION_TOOL_FOUND=1 CFENGINE_SERVER_RUNNING=1 Report "automation_tool_running[]=cf-server" - Display --indent 4 --text "Found: CFEngine (cf-server)" --result FOUND --color GREEN + Display --indent 4 --text "Found: CFEngine (cf-server)" --result "${STATUS_FOUND}" --color GREEN fi fi done @@ -85,7 +85,7 @@ CHEFCLIENTBINARY="${I}/chef-client" AUTOMATION_TOOL_FOUND=1 Report "automation_tool_running[]=chef-client" - Display --indent 4 --text "Found: Chef client (chef-client)" --result FOUND --color GREEN + Display --indent 4 --text "Found: Chef client (chef-client)" --result "${STATUS_FOUND}" --color GREEN LogText "Result: found chef-client (chef client daemon) in ${I}" fi if [ -f ${I}/erchef ]; then @@ -93,7 +93,7 @@ LogText "Result: Chef Server (erchef) is installed (${CHEFSERVERBINARY})" AUTOMATION_TOOL_FOUND=1 Report "automation_tool_running[]=chef-server" - Display --indent 4 --text "Found: Chef Server (erchef)" --result FOUND --color GREEN + Display --indent 4 --text "Found: Chef Server (erchef)" --result "${STATUS_FOUND}" --color GREEN LogText "Result: found erchef (chef server daemon) in ${I}" fi fi @@ -104,14 +104,14 @@ LogText "Result: Puppet is installed (${PUPPETBINARY})" AUTOMATION_TOOL_FOUND=1 Report "automation_tool_running[]=puppet-agent" - Display --indent 4 --text "Found: Puppet (agent)" --result FOUND --color GREEN + Display --indent 4 --text "Found: Puppet (agent)" --result "${STATUS_FOUND}" --color GREEN fi IsRunning "puppet master" if [ ${RUNNING} -eq 1 ]; then LogText "Result: found puppet master" PUPPET_MASTER_RUNNING=1 Report "automation_tool_running[]=puppet-master" - Display --indent 4 --text "Found: Puppet (master)" --result FOUND --color GREEN + Display --indent 4 --text "Found: Puppet (master)" --result "${STATUS_FOUND}" --color GREEN fi # SaltStack @@ -120,14 +120,14 @@ AUTOMATION_TOOL_FOUND=1 SALT_MINION_RUNNING=1 Report "automation_tool_running[]=saltstack-minion" - Display --indent 4 --text "Found: SaltStack minion (salt-minion)" --result FOUND --color GREEN + Display --indent 4 --text "Found: SaltStack minion (salt-minion)" --result "${STATUS_FOUND}" --color GREEN fi if [ ! "${SALTMASTERBINARY}" = "" ]; then LogText "Result: SaltStack (salt-master) is installed (${SALTMASTERBINARY})" AUTOMATION_TOOL_FOUND=1 SALT_MASTER_RUNNING=1 Report "automation_tool_running[]=saltstack-minion" - Display --indent 4 --text "Found: SaltStack master (salt-master)" --result FOUND --color GREEN + Display --indent 4 --text "Found: SaltStack master (salt-master)" --result "${STATUS_FOUND}" --color GREEN else IsRunning "salt-master" if [ ${RUNNING} -eq 1 ]; then @@ -135,14 +135,14 @@ AUTOMATION_TOOL_FOUND=1 SALT_MASTER_RUNNING=1 Report "automation_tool_running[]=saltstack-master" - Display --indent 4 --text "Found: SaltStack (master)" --result FOUND --color GREEN + Display --indent 4 --text "Found: SaltStack (master)" --result "${STATUS_FOUND}" --color GREEN fi fi if [ ${AUTOMATION_TOOL_FOUND} -eq 1 ]; then - Display --indent 2 --text "- Automation tooling" --result FOUND --color GREEN + Display --indent 2 --text "- Automation tooling" --result "${STATUS_FOUND}" --color GREEN else - Display --indent 2 --text "- Automation tooling" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Automation tooling" --result "${STATUS_NOT_FOUND}" --color YELLOW ReportSuggestion ${TEST_NO} "Determine if automation tools are present for system management" fi fi @@ -164,7 +164,7 @@ IDS_IPS_TOOL_FOUND=1 LogText "Result: Fail2ban is installed (${FAIL2BANBINARY})" Report "ids_ips_tooling[]=fail2ban" - Display --indent 2 --text "- Checking presence of Fail2ban" --result FOUND --color GREEN + Display --indent 2 --text "- Checking presence of Fail2ban" --result "${STATUS_FOUND}" --color GREEN else LogText "Result: Fail2ban not present (fail2ban-server not found)" fi @@ -202,14 +202,14 @@ if [ ${FAIL2BAN_SILENT} -eq 0 ] && [ ${FAIL2BAN_EMAIL} -eq 0 ]; then LogText "No registered actions found in ${FAIL2BAN_CONFIG}" - Display --indent 4 --text "- Checking Fail2ban actions" --result NONE --color RED + Display --indent 4 --text "- Checking Fail2ban actions" --result "${STATUS_NONE}" --color RED ReportWarning "${TEST_NO}" "M" "${FAIL2BAN_CONFIG}" "There are no actions configured for Fail2ban." AddHP 0 3 fi if [ ${FAIL2BAN_SILENT} -eq 0 ] && [ ${FAIL2BAN_EMAIL} -eq 1 ]; then LogText "All actions in ${FAIL2BAN_CONFIG} are configured to send email alerts" - Display --indent 4 --text "- Checking Fail2ban actions" --result OK --color GREEN + Display --indent 4 --text "- Checking Fail2ban actions" --result "${STATUS_OK}" --color GREEN AddHP 3 3 fi @@ -222,7 +222,7 @@ if [ ${FAIL2BAN_SILENT} -eq 1 ] && [ ${FAIL2BAN_EMAIL} -eq 0 ]; then LogText "None of the actions found in ${FAIL2BAN_CONFIG} are configured to send email alerts" - Display --indent 4 --text "- Checking Fail2ban actions" --result NONE --color YELLOW + Display --indent 4 --text "- Checking Fail2ban actions" --result "${STATUS_NONE}" --color YELLOW ReportSuggestion "${TEST_NO}" "None of the Fail2ban jails are configured to send email notifications. Consider changing these to emailed alerts." AddHP 1 3 fi @@ -233,11 +233,11 @@ FIND=`egrep "^enabled\s*=\s*true" ${FAIL2BAN_CONFIG}` if [ ! "${FIND}" = "" ]; then LogText "Result: found at least one enabled jail" - Display --indent 4 --text "- Checking Fail2ban jails" --result ENABLED --color GREEN + Display --indent 4 --text "- Checking Fail2ban jails" --result "${STATUS_ENABLED}" --color GREEN AddHP 3 3 else LogText "Result: Fail2ban installed but completely disabled" - Display --indent 4 --text "- Checking Fail2ban jails" --result DISABLED --color RED + Display --indent 4 --text "- Checking Fail2ban jails" --result "${STATUS_DISABLED}" --color RED AddHP 0 3 ReportWarning "${TEST_NO}" "M" "All jails in Fail2ban are disabled" "${FAIL2BAN_CONFIG}" fi @@ -250,15 +250,15 @@ CHECK_CHAINS=`${IPTABLESBINARY} -L 2>&1 | grep fail2ban` if [ ! "${CHECK_CHAINS}" = "" ]; then LogText "Result: found at least one iptables chain for fail2ban" - Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result OK --color GREEN + Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result "${STATUS_OK}" --color GREEN else LogText "Result: Fail2ban installed but iptables chain not present - fail2ban will not work" - Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result WARNING --color RED + Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result "${STATUS_WARNING}" --color RED AddHP 0 3 ReportSuggestion "${TEST_NO}" "M" "Check config to see why iptables does not have a fail2ban chain" "${FAIL2BAN_CONFIG}" fi else - Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result WARNING --color RED + Display --indent 4 --text "- Checking for Fail2ban iptables chain" --result "${STATUS_WARNING}" --color RED ReportSuggestion "${TEST_NO}" "H" "iptables doesn't seem to be installed; Fail2ban will not work. Remove Fail2ban or install iptables" "${FAIL2BAN_CONFIG}" fi fi @@ -272,10 +272,10 @@ if [ ${SKIPTEST} -eq 0 ]; then if [ ${IDS_IPS_TOOL_FOUND} -eq 1 ]; then - Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result FOUND --color GREEN + Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result "${STATUS_FOUND}" --color GREEN AddHP 2 2 else - Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result NONE --color YELLOW + Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result "${STATUS_NONE}" --color YELLOW #ReportSuggestion ${TEST_NO} "Ensure that automatic intrusion detection/prevention tools are installed" AddHP 0 2 fi |