From dce360e2b4890fe5e44e64abb80a9cf77287aa42 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 27 Nov 2007 22:04:48 +0000 Subject: [PATCH] Generate a random number correctly --- etc/rc.update_bogons.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index d94fd9a1ca..26b0c3069f 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -4,11 +4,8 @@ # Part of the pfSense project # www.pfsense.com -# Grab a random value between 0-999. -value=$RANDOM -while [ $value -gt 999 ] ; do - value=$RANDOM -done +# Grab a random value +value=`hexdump -n1 -e\"%u\" /dev/random` # Sleep for that time. sleep $value