Merge pull request #1127 from sbaumgartner75/master

Update tests_time
This commit is contained in:
Michael Boelen 2021-03-30 13:27:45 +02:00 committed by GitHub
commit 4de41543e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -585,6 +585,10 @@
if [ ! -e "${SYNCHRONIZED_FILE}" ]; then
SYNCHRONIZED_FILE="/var/lib/private/systemd/timesync/clock"
fi
# Fix for debian stretch
if [ ! -e "${SYNCHRONIZED_FILE}" ]; then
SYNCHRONIZED_FILE="/var/lib/systemd/clock"
fi
if [ -e "${SYNCHRONIZED_FILE}" ]; then
FIND=$(( $(date +%s) - $(${STATBINARY} -L --format %Y "${SYNCHRONIZED_FILE}") ))
# Check if last sync was more than 2048 seconds (= the default of systemd) ago