diff --git a/Apply/server/1/0.0.0.0.0/run.sh b/Apply/server/1/0.0.0.0.0/run.sh index bcc9e87..712f91a 100644 --- a/Apply/server/1/0.0.0.0.0/run.sh +++ b/Apply/server/1/0.0.0.0.0/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -## 0.0.0.0.0 test +## test run sample apply Apply 0 1 "Test true" [[ -f /etc/passwd ]] Apply 0 2 "Test false" [[ -f /etc/nofile ]] diff --git a/Apply/server/1/1.1.1.1.0/run.sh b/Apply/server/1/1.1.1.1.0/run.sh index 33a9f97..fe3489e 100644 --- a/Apply/server/1/1.1.1.1.0/run.sh +++ b/Apply/server/1/1.1.1.1.0/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -## 1.1.1.1 Ensure cramfs kernel module is not available (Automated) +## Ensure cramfs kernel module is not available (Automated) Apply 1 1 "cramfs" echo '/bin/true' > /etc/modprobe.d/cramfs.conf Apply 0 2 "cramfs" echo "tout va bien" diff --git a/Check/server/1/1.1.1.1.0/run.sh b/Check/server/1/1.1.1.1.0/run.sh index 337bcde..dc796a8 100644 --- a/Check/server/1/1.1.1.1.0/run.sh +++ b/Check/server/1/1.1.1.1.0/run.sh @@ -1,6 +1,6 @@ -#!/bin/bash +!/bin/bash -## 1.1.1.1 Ensure cramfs kernel module is not available (Automated) +## Ensure cramfs kernel module is not available (Automated) [[ ! -f /etc/modprobe.d/cramfs.conf ]] && ((CptErr++)) [[ -z $(cat /etc/modprobe.d/cramfs.conf|grep '/bin/true') ]] && ((CptErr++)) diff --git a/pem-cyber-linux.d/function b/pem-cyber-linux.d/function index 76fed34..681350f 100644 --- a/pem-cyber-linux.d/function +++ b/pem-cyber-linux.d/function @@ -16,9 +16,9 @@ function LogTest() { # LogTest ${Res} ${Action} ${TEST} if [[ ${1} -ne 0 ]] then - echo -e "\n### ${2} - [RESULT] - ${3} : FAILED" + echo -e "\n|FAILED|${2}|${3}|${4}" else - echo -e "\n### ${2} - [RESULT] - ${3} : SUCESS" + echo -e "\n|OK|${2}|${3}|${4}" fi | tee -a ${RealLogDir}/${3}.log } diff --git a/pem-cyber-linux.sh b/pem-cyber-linux.sh index 2769dc8..67fed18 100755 --- a/pem-cyber-linux.sh +++ b/pem-cyber-linux.sh @@ -39,6 +39,7 @@ for File in $(find ${DirAction} -type f -name run.sh| sort -n) cd $(dirname ${File}) Test=$(basename $(dirname ${File})) export CptErr=0 + TxtDesc=$(cat ./run.sh | grep ^'##' | sed 's/#//g') bash ${Debug} ./run.sh &> ${RealLogDir}/${Test}.log - LogTest ${?} ${Action} ${Test} + LogTest ${?} ${Action} ${Test} "${TxtDesc}" done