lkml.org 
[lkml]   [2002]   [Sep]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 14 Sep 2002 15:27:32 -0400
FromDave Maietta <>
Subject[TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts
This fixes the sample shellscripts given in the comments of 
drivers/char/random.c.
The scripts save and restore random seeds for /dev/random across reboots.

--- linux/drivers/char/random.c.orig	2002-09-14 14:56:03.000000000 -0400
+++ linux/drivers/char/random.c	2002-09-14 14:56:51.000000000 -0400
@@ -175,7 +175,7 @@
   *	chmod 600 $random_seed
   *	poolfile=/proc/sys/kernel/random/poolsize
   *	[ -r $poolfile ] && bytes=`cat $poolfile` || bytes=512
- *	dd if=/dev/urandom of=$random_seed count=1 bs=bytes
+ *	dd if=/dev/urandom of=$random_seed count=1 bs=$bytes
   *
   * and the following lines in an appropriate script which is run as
   * the system is shutdown:
@@ -188,7 +188,7 @@
   *	chmod 600 $random_seed
   *	poolfile=/proc/sys/kernel/random/poolsize
   *	[ -r $poolfile ] && bytes=`cat $poolfile` || bytes=512
- *	dd if=/dev/urandom of=$random_seed count=1 bs=bytes
+ *	dd if=/dev/urandom of=$random_seed count=1 bs=i$bytes
   *
   * For example, on most modern systems using the System V init
   * scripts, such code fragments would be found in
Dave Maietta
37167 North Orchard Cr #4-60
Westland MI 48186
734-326-3059 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:28    [W:0.036 / U:0.110 seconds]
©2003-2008 Jasper Spaans