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:
parent
22e542a011
commit
5b64065415
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user