packages: clamav/clamav-cron-updatedb - one fix is enough (revert previous ...

glen glen at pld-linux.org
Wed Oct 21 15:00:56 CEST 2009


Author: glen                         Date: Wed Oct 21 13:00:56 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- one fix is enough (revert previous one)
- avoid divide by zero

---- Files affected:
packages/clamav:
   clamav-cron-updatedb (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: packages/clamav/clamav-cron-updatedb
diff -u packages/clamav/clamav-cron-updatedb:1.10 packages/clamav/clamav-cron-updatedb:1.11
--- packages/clamav/clamav-cron-updatedb:1.10	Wed Oct 21 12:12:07 2009
+++ packages/clamav/clamav-cron-updatedb	Wed Oct 21 15:00:50 2009
@@ -9,7 +9,10 @@
 
 hour=$(LC_ALL=C date '+%k')
 
-div=$((hour % ${UPDATE_HOUR#0}))
+# skip divide errors
+[ "$hour" = "0" ] && exit 0
+
+div=$((hour % $UPDATE_HOUR))
 
 [ "$div" = "0" ] || exit 0
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/clamav/clamav-cron-updatedb?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list