X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e77aedb863e2a9eebb5aa9628121d350c029527d..dd640f3cece45693b57b49d90ba7cc4134577070:/debian/apt.cron.daily diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 5c00f22db..3f9df9d7e 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 count=1 2> /dev/null | cksum | 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" @@ -375,7 +375,7 @@ fi check_power || exit 0 # check if we can lock the cache and if the cache is clean -if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; then +if which apt-get >/dev/null && ! eval apt-get check $XAPTOPT $XSTDERR ; then debug_echo "error encountered in cron job with \"apt-get check\"." exit 0 fi