diff options
| author | Sheldon Hearn <sheldonh@FreeBSD.org> | 2000-07-24 13:40:41 +0000 |
|---|---|---|
| committer | Sheldon Hearn <sheldonh@FreeBSD.org> | 2000-07-24 13:40:41 +0000 |
| commit | ae193fb45bbce82c658be81ae133604cdd94178e (patch) | |
| tree | e107f85313839e939544a8d9996f8c5d0a35457a | |
| parent | 899266e3463c47547c1b3f639b632ae355f5b358 (diff) | |
Notes
| -rw-r--r-- | etc/rc | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -138,9 +138,17 @@ case ${entropy_file} in [Nn][Oo] | '') ;; *) - if [ -f ${entropy_file} -a -r ${entropy_file} ]; then + if [ -f ${entropy_file} -a -r ${entropy_file} -a -w /dev/random ]; then echo "Reading entropy file" - cat ${entropy_file} > /dev/random + if ! cat ${entropy_file} 2>/dev/null >/dev/random; then + if ! kldstat -n randomdev >/dev/null 2>&1; then + kldload randomdev && \ + cat ${entropy_file} 2>/dev/null >/dev/random + fi + fi + if [ $? != 0 ]; then + echo "Writing entropy file to /dev/random failed" + fi rm -f ${entropy_file} fi ;; |
