diff options
author | Katarina Durechova <durechova@ynet.sk> | 2017-10-31 11:05:29 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-10-31 11:05:29 +0300 |
commit | 09de901d114afc157040e998ee3aacf82357d60d (patch) | |
tree | 17cda6ef0bb205d546548cb7b7ac3d3d205dda3b /include/tests_time | |
parent | 8048b3d682bbb65489c5c6a8740007b61badc211 (diff) |
Check zero size of files correctly (#487)
from man test:
-s FILE
FILE exists and has a size greater than zero
-z STRING
the length of STRING is zero
Diffstat (limited to 'include/tests_time')
-rw-r--r-- | include/tests_time | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_time b/include/tests_time index 05781c81..4d9dbfe5 100644 --- a/include/tests_time +++ b/include/tests_time @@ -428,7 +428,7 @@ FOUND=0 FILE="/etc/ntp/step-tickers" if [ -f ${FILE} ]; then - if [ -z ${FILE} ]; then + if [ ! -s "${FILE}" ]; 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" |