git: 8930e7d8ea4d - releng/14.1 - save-entropy: Add manual page
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 May 2024 17:25:19 UTC
The branch releng/14.1 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8930e7d8ea4dc0ec34c6d2f7db5a7c7746997b8f commit 8930e7d8ea4dc0ec34c6d2f7db5a7c7746997b8f Author: Fernando ApesteguĂa <fernape@FreeBSD.org> AuthorDate: 2023-09-07 08:28:43 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-05-16 17:24:30 +0000 save-entropy: Add manual page Succinct manual page for save-entropy(8). PR: 223998 Reported by: AJ Jordan <alex+freebsd@strugee.net> Reviewed by: carlavilla@, delphij@, lwhsu@, pauamma_gundo.com Approved by: delphi, lwhsu (src) Differential Revision: https://reviews.freebsd.org/D41768 (cherry picked from commit 8dc9b10e388da19d63b3dd718a8243e8e969091d) (cherry picked from commit 227f81c8bd0f60176519276839b24b468afce0bc) Approved by: re (cperciva) --- libexec/save-entropy/Makefile | 1 + libexec/save-entropy/save-entropy.8 | 97 +++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/libexec/save-entropy/Makefile b/libexec/save-entropy/Makefile index 1c7eabf36c7f..0c541606411f 100644 --- a/libexec/save-entropy/Makefile +++ b/libexec/save-entropy/Makefile @@ -1,4 +1,5 @@ SCRIPTS= save-entropy.sh +MAN= save-entropy.8 .include <bsd.prog.mk> diff --git a/libexec/save-entropy/save-entropy.8 b/libexec/save-entropy/save-entropy.8 new file mode 100644 index 000000000000..f7a93c8866fc --- /dev/null +++ b/libexec/save-entropy/save-entropy.8 @@ -0,0 +1,97 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Fernando Apesteguia <fernando.apesteguia@gmail.com> +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd September 18, 2023 +.Dt SAVE-ENTROPY 8 +.Os +.Sh NAME +.Nm save-entropy +.Nd Save bits of entropy to feed /dev/random at startup +.Sh SYNOPSIS +.Nm save-entropy +.Sh DESCRIPTION +The +.Nm +command is used to save entropy data from +.Pa /dev/random +to files in a specified output location. +The files saved are used at startup to provide additional entropy for +.Pa /dev/random . +The output file will be different in every invocation until the maximum number +of different files is reached. +(See +.Em entropy_save_num +for details). +By default this script is invoked via +.Xr cron 8 +every eleven minutes approximately. +.Pp +This command does nothing if executed inside a +.Xr jail 8 . +.Pp +Three variables in +.Pa /etc/rc.conf +regulate the behavior of the script: +.Bl -tag -width Ds +.It Va entropy_dir +Specify the directory for saved entropy files. +Defaults to +.Pa /var/db/entropy . +If set to "NO" it disables caching entropy via +.Xr cron 8 . +This setting is shared with +.Pa /etc/rc.d/random . +.It Va entropy_save_sz +Size of the entropy cache files. +Defaults to 4096. +.It Va entropy_save_num +Number of entropy cache files to save. +Defaults to 8. +.El +.Sh FILES +.Bl -tag -width Ds +.It Pa /etc/rc.conf +.El +.Sh EXIT STATUS +.Ex -std +Errors will be recorded in the system log. +.Sh SEE ALSO +.Xr syslog 3 , +.Xr random 4 , +.Xr rc.conf 5 , +.Xr cron 8 +.Sh HISTORY +The +.Nm +command first appeared in +.Fx 5.0 . +.Sh AUTHORS +The +.Nm +command was originally written by +.An Doug Barton <dougb@FreeBSD.org> . +This manual page was written by +.An Fernando Apesteguia <fernape@FreeBSD.org> .