]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
Merge remote-tracking branch 'mvo/feature/install-progress' into debian/sid
[apt.git] / debian / apt.cron.daily
index 27f08dd4aa8e273069bfc37b08b97088f54cde07..2665b65796e9e6a1c07eb88af23d95fc7e0f685a 100644 (file)
@@ -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"