[UPDATE] - change log format
This commit is contained in:
parent
3e3031ee27
commit
0317a3c506
@ -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 ]]
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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++))
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user