Hi Marc

Thanks. Ah, yes I did not think of that case. Will apply.

// Ola

On Sun, Oct 07, 2012 at 07:08:22PM +0200, Marc Haber wrote:
> Package: cron-apt
> Severity: normal
> 
> Please consider the following patch:
> 
> --- cron-apt.orig       2012-10-07 19:07:15.772153360 +0200
> +++ cron-apt    2012-10-07 19:07:32.748173175 +0200
> @@ -299,7 +299,7 @@
>      if [ $RUNSLEEP -gt 0 ] ; then
>         if [ -z "$RANDOM" ] ; then
>              # A fix for shells that do not have this bash feature.
> -           RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut 
> -c"1-5")
> +           RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut 
> -d' ' -f1)
>         fi
>         TIME=$(($RANDOM % $RUNSLEEP))
>         sleep $TIME                                                           
>   
>       
> which will help cron-apt to gracefully handle the case where the
> checksum returned by cksum is shorter than four digits.
> 
> Greetings
> Marc
> 
> 
> -- System Information:
> Debian Release: wheezy/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.5.4-zgws1 (SMP w/8 CPU cores; PREEMPT)
> Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 

-- 
 --------------------- Ola Lundqvist ---------------------------
/  [email protected]                     Annebergsslingan 37      \
|  [email protected]                      654 65 KARLSTAD          |
|  http://inguza.com/                  +46 (0)70-332 1551       |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to