]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
setclock: fix empty logfile check.
authorArne Fitzenreiter <Arne_F@ipfire.org>
Sat, 2 Feb 2013 08:42:05 +0000 (09:42 +0100)
committerArne Fitzenreiter <Arne_F@ipfire.org>
Sat, 2 Feb 2013 08:42:05 +0000 (09:42 +0100)
src/initscripts/init.d/setclock

index 86c161453bcf385ecbcbf312035f4fdee4099c46..661e944a424db37999c5884f6fcadf250553434a 100644 (file)
@@ -31,7 +31,7 @@ case ${1} in
 
                hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
                if [ ! ${?} == 0 ]; then
-                       if [ ! -z /var/log/messages ]; then
+                       if [ -s /var/log/messages ]; then
                                boot_mesg -n "No RTC found, set time to last log accesstime ... "
                                DATE=`stat --format "%y" /var/log/messages | cut -d" " -f1`
                                TIME=`stat --format "%y" /var/log/messages | sed -e "s|\..*||g" | cut -d" " -f2`