summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2005-04-11 02:45:05 +0000
committerdougb <dougb@FreeBSD.org>2005-04-11 02:45:05 +0000
commit7558fa129d5ec41497b9af2853723a0548f2b0e6 (patch)
treecace9f5557db5804887a28d9bab1a677eb397d89 /etc
parent154f169fab549671d3cd8764a87e448ec489ce5d (diff)
downloadFreeBSD-src-7558fa129d5ec41497b9af2853723a0548f2b0e6.zip
FreeBSD-src-7558fa129d5ec41497b9af2853723a0548f2b0e6.tar.gz
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 <list@rachinsky.de>
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf2
-rw-r--r--etc/rc.d/random9
2 files changed, 5 insertions, 6 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 384be74..a187755 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -459,7 +459,7 @@ kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure
update_motd="YES" # update version info in /etc/motd (or NO)
unaligned_print="YES" # print unaligned access warnings on the alpha (or NO).
entropy_file="/entropy" # Set to NO to disable caching entropy through reboots.
- # /var/db/entropy is preferred if / is not available.
+ # /var/db/entropy-file is preferred if / is not avail.
entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron.
entropy_save_sz="2048" # Size of the entropy cache files.
entropy_save_num="8" # Number of entropy cache files to save.
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} \
OpenPOWER on IntegriCloud