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:
authormboelen <michael@cisofy.com>2016-04-26 14:05:17 +0300
committermboelen <michael@cisofy.com>2016-04-26 14:05:17 +0300
commit4791b8a6bf269d20b9ce4e70c8af255df0743528 (patch)
tree304bcb5b19c43659a8e978a871ba17da10e46c46 /include/tests_scheduling
parent448fd65e316eb4263ba275a2a846cfb953b8c77a (diff)
Add scheduler[] and minor cleanups
Diffstat (limited to 'include/tests_scheduling')
-rw-r--r--include/tests_scheduling23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/tests_scheduling b/include/tests_scheduling
index 937053fd..fae2236c 100644
--- a/include/tests_scheduling
+++ b/include/tests_scheduling
@@ -41,7 +41,8 @@
else
LogText "Result: cron daemon running"
CROND_RUNNING=1
- report "crond_running=1"
+ Report "crond_running=1"
+ Report "scheduler[]=crond"
fi
fi
#
@@ -51,10 +52,9 @@
# Description : Check crontab / cronjobs
Register --test-no SCHD-7704 --weight L --network NO --description "Check crontab/cronjobs"
if [ ${SKIPTEST} -eq 0 ]; then
- FindCronJob()
- {
+ FindCronJob() {
sCRONJOBS=`egrep '^([0-9*])' $1 | tr '\t' ' ' | tr -s ' ' | tr ' ' ','`
- }
+ }
if [ -f /etc/crontab ]; then
FindCronJob /etc/crontab
@@ -81,6 +81,7 @@
FindCronJob ${J}
for K in ${sCRONJOBS}; do
LogText "Result: Found cronjob (${I}): ${K}"
+ Report "cronjob[]=${J}"
done
done
LogText "Result: done with analyzing files in ${I}"
@@ -144,10 +145,13 @@
if [ -f /etc/anacrontab ]; then
LogText "Test: checking anacrontab"
sANACRONJOBS=`egrep '^([0-9@])' /etc/anacrontab | tr '\t' ' ' | tr -s ' ' | tr ' ' ','`
- for J in ${sANACRONJOBS}; do
- LogText "Found anacron job (/etc/anacrontab): ${J}"
- Report "cronjob[]=${J}"
- done
+ if [ ! "${sANACRONJOBS}" = "" ]; then
+ Report "scheduler[]=anacron"
+ for J in ${sANACRONJOBS}; do
+ LogText "Found anacron job (/etc/anacrontab): ${J}"
+ Report "cronjob[]=${J}"
+ done
+ fi
fi
fi
@@ -166,9 +170,10 @@
LogText "Result: at daemon active"
Display --indent 2 --text "- Checking atd status" --result RUNNING --color GREEN
ATD_RUNNING=1
+ Report "scheduler[]=atd"
else
LogText "Result: at daemon not active"
- Display --indent 2 --text "- Checking atd status" --result "NOT RUNNING" --color WHITE
+ if IsVerbose; then Display --indent 2 --text "- Checking atd status" --result "NOT RUNNING" --color WHITE; fi
fi
fi
#