Commit Graph

9 Commits

Author SHA1 Message Date
martin 3bcfc111ed Pull up following revision(s) (requested by riastradh in ticket #882):
etc/rc.d/random_seed: revision 1.9

Don't delete the random seed before issuing `rndctl -S'.
`rndctl -S' can replace the file just fine, and deleting it ahead of
time adds a window during which we can lose the seed altogether if
the system is interrupted by a crash or power outage.

XXX pullup
2020-05-02 16:24:11 +00:00
martin f22f59d249 Pull up following revision(s) (requested by riastradh in ticket #743):
etc/rc.d/random_seed: revision 1.8

Allow random seed on zfs.
2020-03-01 11:53:09 +00:00
wiz 7f6fa64667 'file system' for consistency with documentation (instead of 'filesystem'). 2014-07-22 17:11:09 +00:00
christos 7c8b13934d better messages, more quoting. 2012-12-29 22:15:07 +00:00
apb 448aa50d4c Reinstate the dirname invocations that were recently removed from
rc.d/random_seed.  The new dirname shell function provided by rc.subr
will be used, so it should work before the /usr file system is mounted.

This should fix a problem in which the fs_safe shell function failed when
passed the name of a file that did not exist.
2012-12-17 18:20:50 +00:00
apb c755e023f2 Avoid using programs from /usr/bin. This should fix PR 47326.
- no need for "dirname", because "df -G" can take a file name directly.
- replace use of "awk" with a shell while read loop.
- replace use of "stat -s" with "ls -ldn".
- no need for "tail" now that the use of "stat" has changed.

While here, also add some shell quotes and improve the grammar in a comment.
2012-12-14 18:42:25 +00:00
apb 5f5f1a05cc Cause /etc/rc.d/random_seed to be the first script to run
after mountcritlocal.  Everything else that runs after
mountcritlocal depends directly or indirectly on bootconf, so
making random_seed run before bootconf has the desired result.
2012-11-10 15:10:22 +00:00
hans f9669c1ea4 It's msdos, not msdosfs. 2012-07-08 14:25:49 +00:00
tls 4924aa205a Load entropy at system boot (only works at securelevel < 1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.
2011-11-23 10:47:48 +00:00