summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/random
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/rc.d/random
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/rc.d/random')
-rw-r--r--etc/rc.d/random9
1 files changed, 4 insertions, 5 deletions
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