Commit 00f94068 authored by Dave Maietta's avatar Dave Maietta

[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.
parent 868b8175
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment