linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Maietta <dave@qix.net>
To: linux-kernel@vger.kernel.org
Cc: trivial@rustcorp.com.au
Subject: [TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts
Date: Sat, 14 Sep 2002 15:27:32 -0400	[thread overview]
Message-ID: <20020914152732.A8713@hell> (raw)

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 

             reply	other threads:[~2002-09-14 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-14 19:27 Dave Maietta [this message]
2002-09-17 23:55 [TRIVIAL][PATCH] 2.4 drivers_char_random.c fix sample shellscripts Dave Maietta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020914152732.A8713@hell \
    --to=dave@qix.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).