linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts
@ 2002-09-17 23:55 Dave Maietta
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Maietta @ 2002-09-17 23:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

[tyop in first sumbissoin, fixed here]
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-17 19:49:34.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=$bytes
   *
   * For example, on most modern systems using the System V init
   * scripts, such code fragments would be found in

Dave Maietta
North Orchard Cr #4-60
Westland MI 48186
734-326-3059 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts
@ 2002-09-14 19:27 Dave Maietta
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Maietta @ 2002-09-14 19:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-17 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17 23:55 [TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts Dave Maietta
  -- strict thread matches above, loose matches on Subject: below --
2002-09-14 19:27 Dave Maietta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).