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>2016-08-13 11:48:35 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-08-13 11:48:35 +0300
commit075a69e125a58381be9ff24bf6126245a8d5aac6 (patch)
treec442917a0a881ece42ca0e652455cc77d04b1ee1 /include/tests_custom.template
parentd5a5cc317342032ebbeb607edf8828d049a474be (diff)
Extended example
Diffstat (limited to 'include/tests_custom.template')
-rw-r--r--include/tests_custom.template8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/tests_custom.template b/include/tests_custom.template
index 5788effc..f2e6a2ef 100644
--- a/include/tests_custom.template
+++ b/include/tests_custom.template
@@ -111,9 +111,11 @@
# Test : CUST-0040
# Description : Our second test, with a prequisite test
- # First check if OPENSSLBINARY is known as a prerequisite for this test.
- if [ ! "${OPENSSLBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
- Register --test-no CUST-0040 --preqs-met ${PREQS_MET} --weight M --network NO --category security --description "Description of custom test"
+ # First check if OPENSSLBINARY is known as a prerequisite for this test
+ # ! means "not". So if the binary is known, the prerequisite is matched. Otherwise we set it to NO and define a reason why we skipped this test
+
+ if [ ! "${OPENSSLBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; SKIPREASON="No OpenSSL binary found"; fi
+ Register --test-no CUST-0040 --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight M --network NO --category security --description "Description of custom test"
if [ ${SKIPTEST} -eq 0 ]; then
# Set variable to zero, to indicate that we have no problems found (yet)
FOUNDPROBLEM=0