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
This commit is contained in:
parent
0e167ae7b7
commit
822f075781
4
etc/rc
4
etc/rc
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user