diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2000-07-17 13:39:48 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2000-07-17 13:39:48 +0000 |
commit | 59ad463b6cb30b2828ca1c035845c8b43c8a3e1b (patch) | |
tree | 8e619ad955ed55a9fcb3b8f761760fec52647956 /etc | |
parent | 263ffe32d13445d7647ddc4ebdb26e361e142020 (diff) | |
download | FreeBSD-src-59ad463b6cb30b2828ca1c035845c8b43c8a3e1b.zip FreeBSD-src-59ad463b6cb30b2828ca1c035845c8b43c8a3e1b.tar.gz |
Improve on previous commit:
Don't inhibit the trailing newline for entropy-related messages.
Try harder to save the seed file on shutdown.
Reviewed by: markm
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 4 | ||||
-rw-r--r-- | etc/rc.shutdown | 11 |
2 files changed, 7 insertions, 8 deletions
@@ -138,8 +138,8 @@ case ${entropy_file} in [Nn][Oo] | '') ;; *) - if [ -f ${entropy_file} -a -r ${entropy_file} ] ; then - echo -n "Reading entropy file" + if [ -f ${entropy_file} -a -r ${entropy_file} ]; then + echo "Reading entropy file" cat ${entropy_file} > /dev/random rm -f ${entropy_file} fi diff --git a/etc/rc.shutdown b/etc/rc.shutdown index 7014c70..4abeda0 100644 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -32,12 +32,11 @@ case ${entropy_file} in [Nn][Oo] | '') ;; *) - if [ -f ${entropy_file} -a -r ${entropy_file} ] ; then - echo -n "Writing entropy file" - touch ${entropy_file} && \ - chmod 600 ${entropy_file} && \ - dd if=/dev/random of=${entropy_file} bs=4096 count=1 - fi + echo "Writing entropy file" + rm -f ${entropy_file} + touch ${entropy_file} && \ + chmod 600 ${entropy_file} && \ + dd if=/dev/random of=${entropy_file} bs=4096 count=1 ;; esac |