From bf2462272e3d51d63f8b85fc8abadbfe5cd59390 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Wed, 6 Jun 2018 13:59:07 +0200 Subject: [PATCH] [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. --- include/tests_time | 12 +++++++++--- 1 file 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