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]
This commit is contained in:
ensc 2005-07-28 12:06:36 +00:00
parent 22e542a011
commit 5b64065415

View File

@ -44,7 +44,8 @@ WARNING: update of clamav database is disabled; please see
;;
(*)
sleep $[ FRESHCLAM_DELAY % (FRESHCLAM_MOD*60) ]
let FRESHCLAM_MOD*=60
sleep $[ (FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD ]
;;
esac