aboutsummaryrefslogtreecommitdiffstats
path: root/man4/random.4
diff options
context:
space:
mode:
Diffstat (limited to 'man4/random.4')
-rw-r--r--man4/random.450
1 files changed, 25 insertions, 25 deletions
diff --git a/man4/random.4 b/man4/random.4
index b02a564161..b524c71180 100644
--- a/man4/random.4
+++ b/man4/random.4
@@ -49,9 +49,9 @@ If your system does not have
can be created with the following commands:
.nf
- mknod \-m 644 /dev/random c 1 8
- mknod \-m 644 /dev/urandom c 1 9
- chown root:root /dev/random /dev/urandom
+ mknod \-m 644 /dev/random c 1 8
+ mknod \-m 644 /dev/urandom c 1 9
+ chown root:root /dev/random /dev/urandom
.fi
When a Linux system starts up without much operator interaction,
@@ -63,34 +63,34 @@ To do this, add the following lines to an appropriate script
which is run during the Linux system start-up sequence:
.nf
- echo "Initializing random number generator..."
- random_seed=/var/run/random-seed
- # Carry a random seed from start-up to start-up
- # Load and then save the whole entropy pool
- if [ \-f $random_seed ]; then
- cat $random_seed >/dev/urandom
- else
- touch $random_seed
- fi
- 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
+ echo "Initializing random number generator..."
+ random_seed=/var/run/random-seed
+ # Carry a random seed from start-up to start-up
+ # Load and then save the whole entropy pool
+ if [ \-f $random_seed ]; then
+ cat $random_seed >/dev/urandom
+ else
+ touch $random_seed
+ fi
+ 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
.fi
Also, add the following lines in an appropriate script which is
run during the Linux system shutdown:
.nf
- # Carry a random seed from shut-down to start-up
- # Save the whole entropy pool
- echo "Saving random seed..."
- random_seed=/var/run/random-seed
- touch $random_seed
- 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
+ # Carry a random seed from shut-down to start-up
+ # Save the whole entropy pool
+ echo "Saving random seed..."
+ random_seed=/var/run/random-seed
+ touch $random_seed
+ 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
.fi
.SH "PROC INTERFACE"
The files in the directory