Bug 751598 - redundant terms in freshclam-sleep
Summary: redundant terms in freshclam-sleep
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: clamav
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Enrico Scholz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-06 04:57 UTC by lkadoshxxx
Modified: 2011-11-06 17:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-06 09:08:11 UTC
Type: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.