From 7558fa129d5ec41497b9af2853723a0548f2b0e6 Mon Sep 17 00:00:00 2001 From: dougb Date: Mon, 11 Apr 2005 02:45:05 +0000 Subject: The alternative suggested for /entropy as a shutdown save file was /var/db/entropy, which also happens to be the directory where the individual entropy files created by /usr/libexec/save-entropy are stored. Change the suggestion to be /var/db/entropy-file instead. In an error condition where the shutdown file is not created, the error message accessed a variable that doesn't exist. PR: conf/75722 Submitted by: Nicolas Rachinsky --- etc/rc.d/random | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'etc/rc.d/random') diff --git a/etc/rc.d/random b/etc/rc.d/random index 823db6d..7c72e55 100644 --- a/etc/rc.d/random +++ b/etc/rc.d/random @@ -68,15 +68,14 @@ random_stop() else # Try this as a reasonable alternative for read-only # roots, diskless workstations, etc. - rm -f /var/db/entropy - if touch /var/db/entropy; then - entropy_file_confirmed=/var/db/entropy + rm -f /var/db/entropy-file + if touch /var/db/entropy-file; then + entropy_file_confirmed=/var/db/entropy-file fi fi case ${entropy_file_confirmed} in '') - err 1 '${entropy_file_confirmed}:' \ - ' entropy file write failed.' + err 1 'entropy file write failed.' ;; *) dd if=/dev/random of=${entropy_file_confirmed} \ -- cgit v1.1