]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
setclock: accept also empty logfile timestamp
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 9 Oct 2016 10:10:15 +0000 (12:10 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 9 Oct 2016 10:10:15 +0000 (12:10 +0200)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/init.d/setclock

index 19fb89168a7a2b9385462cc089ff053083f6124d..cc977ddbc0c2021d7e2582c9fec06696eea2b5d8 100644 (file)
@@ -32,7 +32,7 @@ case ${1} in
                hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
                date
 
-               if [ -s /var/log/messages ]; then
+               if [ -e /var/log/messages ]; then
                        LOGTIMESTAMP=`stat --format "%y" /var/log/messages`
                        LOGTIME=`date +%s -d "$LOGTIMESTAMP"`
                        SYSTIME=`date +%s`