Bug 751598

Summary: redundant terms in freshclam-sleep
Product: [Fedora] Fedora Reporter: lkadoshxxx
Component: clamavAssignee: Enrico Scholz <rh-bugzilla>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 15CC: nb, ondrejj, redhat-bugzilla, rh-bugzilla, steve
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-06 09:08:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description lkadoshxxx 2011-11-06 04:57:30 UTC
clamav-update contains the freshclam-sleep script, which inserts a host-specific sleep period before calling the freshclam utility. the period is given by

(FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD


which is the same as

FRESHCLAM_DELAY % FRESHCLAM_MOD

Comment 1 Enrico Scholz 2011-11-06 09:08:11 UTC
commit 5b640654151f0a26c5554ac0418e99f8f173021b
Author: ensc <ensc>
Date:   Thu Jul 28 12:06:36 2005 +0000

    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]

Comment 2 lkadoshxxx 2011-11-06 17:23:18 UTC
ah, i see. that's the reason for the long formula: `hostid` may be negative. thank you.

Comment 3 Jan ONDREJ 2011-11-06 17:34:08 UTC
May be you can add this information to sources as comment.