From: Michael Vogt Date: Thu, 10 Jan 2013 15:46:06 +0000 (+0100) Subject: instead of cut, use % 32767 X-Git-Tag: 0.9.8~50^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/d925ac78f9068618bad0027fff56278d452a7c91?ds=inline instead of cut, use % 32767 --- diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 27f08dd4a..2665b6579 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -289,7 +289,7 @@ random_sleep() fi if [ -z "$RANDOM" ] ; then # A fix for shells that do not have this bash feature. - RANDOM=$(dd if=/dev/urandom bs=2 count=1 2> /dev/null | cksum | cut -d' ' -f1 | cut -c"1-5") + RANDOM=$(( $(dd if=/dev/urandom bs=2 count=1 2> /dev/null | cksum | cut -d' ' -f1) % 32767 )) fi TIME=$(($RANDOM % $RandomSleep)) debug_echo "sleeping for $TIME seconds"