Page MenuHomeFreeBSD

Fix up the startup/shutdown etc/rc.d/* scripting for random(4)
ClosedPublic

Authored by markm on Jun 27 2015, 9:43 AM.
Tags
None
Referenced Files
F103579430: D2924.diff
Tue, Nov 26, 5:50 PM
F103563154: D2924.id6789.diff
Tue, Nov 26, 1:42 PM
Unknown Object (File)
Thu, Oct 31, 9:25 PM
Unknown Object (File)
Thu, Oct 31, 1:27 PM
Unknown Object (File)
Oct 26 2024, 1:46 AM
Unknown Object (File)
Oct 25 2024, 5:30 AM
Unknown Object (File)
Sep 22 2024, 5:46 PM
Unknown Object (File)
Sep 22 2024, 5:46 PM
Subscribers

Details

Summary

The new random(4) needs to have its etc/rc.d/* scripting tightened up.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

markm retitled this revision from to Fix up the startup/shutdown etc/rc.d/* scripting for random(4).
markm updated this object.
markm edited the test plan for this revision. (Show Details)
markm added reviewers: delphij, emaste, imp.

The idea is to commit this when I do D2025 on July 30, 2015.

jilles added inline comments.
etc/rc.d/random
48

This expands to twice sysctl -n.

share/man/man5/rc.conf.5
4057

If /boot is a separate filesystem, then this may well be the only thing writing to it regularly. This might affect reliability negatively.

markm added inline comments.
etc/rc.d/random
48

Oops! Will fix!

share/man/man5/rc.conf.5
4057

I'm not sure I understand you completely here. Do you mean this may be the only thing stashing entropy regularly, and this will therefore affect random(4) reliability? If so, I'm not sure you are right; there is a cron job adding stuff to /var/db/entropy/ which I intend to extend.

Do you mean that this may be wearing out /boot by excessive writing? If so, is one file write per reboot really that onerous? If so (again), could it go somewhere else?

share/man/man5/rc.conf.5
4057

I mean that this very slightly increases the risk of /boot getting corrupted. A rather minor issue given the importance of /.

Also, /boot might be read-only, especially in systems that are more like embedded systems.

share/man/man5/rc.conf.5
4057

Erm, OK, the system owner does have override powers, including the ability to disable its altogether if they wish. Is this acceptable?

This reminds me - I need to ensure the loader scripting is OK too.

Fix script error.

Update default loader.conf.

Update man pages.

markm added inline comments.
share/man/man5/rc.conf.5
4057

Can we leave this a system-owner configurable?

etc/rc.d/random
127

The '' part can't happen because of the ${var:=value} expansion. Either remove it or use ${var=value} instead of ${var:=value}.

share/man/man5/rc.conf.5
4057

Yes.

markm marked 3 inline comments as done.Jul 8 2015, 6:11 PM

Address review comments.

etc/rc.d/random
127

Fixing similar elsewhere.

markm marked 2 inline comments as done.Jul 8 2015, 6:12 PM
This revision was automatically updated to reflect the committed changes.