[Popcon-developers] Bug#462268: Bug#462268: Bug#462268: popcon: stay out of lenny for a while

Bill Allombert Bill.Allombert at math.u-bordeaux1.fr
Thu Mar 20 12:02:14 UTC 2008


On Wed, Mar 19, 2008 at 12:40:37PM +0100, Petter Reinholdtsen wrote:
> +# Select a random day to submit on, to spread the load over time, unless it is already set.
> +select_random_day() {
> +       	RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5")
> +       	DAY=$(($RANDOM % 7))
> +}

This seems overly complex: we could just replace _both_ lines by

  DAY=$(bash -c 'echo $(($RANDOM % 7))')

Cheers,
-- 
Bill. <ballombe at debian.org>

Imagine a large red swirl here. 





More information about the Popcon-developers mailing list