aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/random
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-03 19:34:29 +0000
committerBill Nottingham <notting@redhat.com>1999-02-03 19:34:29 +0000
commit78f1af4fcbcc1193db5e9db036359e14cc98afd9 (patch)
treed4e80f4f61ef4d6f7d436b49ac7f113182a82ca9 /rc.d/init.d/random
parentd503a6fe70268f6b451a80b3fc89641f33491e9e (diff)
downloadinitscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.gz
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.bz2
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.xz
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.zip
more initlog changes; wait a little longer for kill -TERM
Diffstat (limited to 'rc.d/init.d/random')
-rwxr-xr-xrc.d/init.d/random9
1 files changed, 4 insertions, 5 deletions
diff --git a/rc.d/init.d/random b/rc.d/init.d/random
index 55775f1a..3375141b 100755
--- a/rc.d/init.d/random
+++ b/rc.d/init.d/random
@@ -16,14 +16,14 @@ random_seed=/var/run/random-seed
# See how we were called.
case "$1" in
start)
- echo "Initializing random number generator..."
# Carry a random seed from start-up to start-up
# Load and then save 512 bytes, which is the size of the entropy pool
if [ -f $random_seed ]; then
- cat $random_seed >/dev/urandom
+ cmd="cat $random_seed >/dev/urandom"
else
- touch $random_seed
+ cmd="touch $random_seed"
fi
+ action "Initializing random number generator" $cmd
chmod 600 $random_seed
dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
touch /var/lock/subsys/random
@@ -32,10 +32,9 @@ case "$1" in
stop)
# Carry a random seed from shut-down to start-up
# Save 512 bytes, which is the size of the entropy pool
- echo "Saving random seed..."
touch $random_seed
chmod 600 $random_seed
- dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
+ action "Saving random seed" dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null
rm -f /var/lock/subsys/random
;;