rpms/clamav/devel freshclam-sleep,1.1,1.2

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Thu Jul 28 12:06:53 UTC 2005


Author: ensc

Update of /cvs/extras/rpms/clamav/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24002

Modified Files:
	freshclam-sleep 
Log Message:
Fixed calculation of sleep duration; on some systems/IPs, `hostid`
results in a negative number which is retained by the bash
modulo-operation. So the sleep may get a negative number of seconds
being interpreted as an option. This version makes sure that the
module-operations returns a non-negative value. [BZ #164494, James
Wilkinson]



Index: freshclam-sleep
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/freshclam-sleep,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- freshclam-sleep	25 Jul 2005 17:17:06 -0000	1.1
+++ freshclam-sleep	28 Jul 2005 12:06:36 -0000	1.2
@@ -44,7 +44,8 @@
 	;;
 
     (*)
-	sleep $[ FRESHCLAM_DELAY % (FRESHCLAM_MOD*60) ]
+	let FRESHCLAM_MOD*=60
+	sleep $[ (FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD ]
 	;;
 esac
 




More information about the fedora-extras-commits mailing list