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:
authorCarsten Grohmann <carstengrohmann@gmx.de>2018-06-06 14:59:07 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-06-06 14:59:07 +0300
commitbf2462272e3d51d63f8b85fc8abadbfe5cd59390 (patch)
treeaf91ce3fa011eaa2622dd14f195ec04d196d4cf1 /include/tests_time
parent6f7feed172f583429131208c1074cb4988645bcf (diff)
[TIME-3160] Extend check for step-tickers file for RedHat (#553)
On RedHat if the step-tickers file exists but empty, the ntp start script uses the servers listed in ntp.conf for the initial time synchronization.
Diffstat (limited to 'include/tests_time')
-rw-r--r--include/tests_time12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/tests_time b/include/tests_time
index 316cf55a..590b2552 100644
--- a/include/tests_time
+++ b/include/tests_time
@@ -429,9 +429,15 @@
FOUND=0
OUTPUT=$(${AWKBINARY} '/^[a-z0-9]/ { print $1 }' ${FILE})
if [ -z "${OUTPUT}" ]; then
- LogText "Result: ${FILE} is empty. The step-tickers contain no configured NTP servers"
- Display --indent 2 --text "- Checking NTP step-tickers file" --result "EMPTY FILE" --color YELLOW
- ReportSuggestion ${TEST_NO} "Use step-tickers file for quicker time synchronization"
+ if [ ${OS_REDHAT_OR_CLONE} -eq 1 -a -f "${FILE}" ]; then
+ # On RedHat if step-ticker file exists but is empty, the ntpdate start script uses the servers listed in ntp.conf for the initial time synchronization
+ LogText "Result: ${FILE} exists and it is empty. On RedHat the initial time synchronization will be done with the servers listed in ntp.conf."
+ Display --indent 2 --text "- Checking NTP step-tickers file" --result "${STATUS_OK}" --color GREEN
+ else
+ LogText "Result: ${FILE} is empty. The step-tickers contain no configured NTP servers"
+ Display --indent 2 --text "- Checking NTP step-tickers file" --result "EMPTY FILE" --color YELLOW
+ ReportSuggestion ${TEST_NO} "Use step-tickers file for quicker time synchronization"
+ fi
else
LogText "Result: ${FILE} is not empty, which is fine"
Display --indent 2 --text "- Checking NTP step-tickers file" --result "${STATUS_OK}" --color GREEN