git: d84de55c1501 - releng/15.0 - loader.8: Document module commands

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 23 Nov 2025 16:39:09 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=d84de55c15016640a03d0ff43898addd5b9323d8

commit d84de55c15016640a03d0ff43898addd5b9323d8
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-11-14 14:59:09 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-23 16:38:45 +0000

    loader.8: Document module commands
    
    Begin documenting module loader commands in loader(8), where the reader
    would look for them. Segregate them by their availability in individual
    loader implementations, like build(7) targets.
    These details were graciously donated by kevans.
    
    Approved by:    re (cperciva)
    MFC after:              3 days
    Reviewed by:            kevans
    Co-authored-by:         Kyle Evans <kevans@freebsd.org>
    Differential Revision:  https://reviews.freebsd.org/D50727
    
    (cherry picked from commit 6fb0d67819f730e8def56e139f780eff3c0cab0f)
    (cherry picked from commit 513b9db1a829b4efba91c86f280ba97b26c82c1f)
---
 stand/man/loader.8 | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/stand/man/loader.8 b/stand/man/loader.8
index 234eabd571e0..484e0a7b300c 100644
--- a/stand/man/loader.8
+++ b/stand/man/loader.8
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 29, 2021
+.Dd November 14, 2025
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -89,6 +89,52 @@ The commands common to all interpreters are described in the
 .Xr loader_simp 8
 .Dq BUILTIN COMMANDS
 section.
+.Pp
+The following commands are only available in
+.Xr loader_lua 8
+and
+.Xr loader_4th 8 :
+.Pp
+.Bl -tag -width indent -compact
+.\" sort the following entries according to the second field
+.It Ic boot-conf
+Load the
+.Nm
+config and commence the autoboot sequence.
+.Pp
+.It Ic read-conf Ar file
+Load the specified configuration file.
+.Pp
+.It Ic reload-conf
+Revert any previously applied settings, and reload the configuration.
+Set comands that were executed at the command line to override variables
+previously
+.Cm set
+by
+.Xr loader.conf 5
+configuration will also be reverted,
+along with any module options that were toggled.
+.Pp
+.It Ic enable-module Ar kmod-name
+.It Ic disable-module Ar kmod-name
+.It Ic toggle-module Ar kmod-name
+Enable, disable, or toggle loading of the kernel module named
+.Dq Ar kmod-name .
+.Pp
+.It Ic show-module-options
+Describe all modules the
+.Nm
+is aware of, and show if they are enabled or not.
+.El
+.Pp
+The following command is only available in
+.Xr loader_lua 8 :
+.Pp
+.Bl -tag -width indent -compact
+.It Ic disable-device Ar device
+Set a newbus hint to disable the
+.Ar device .
+.El
 .Ss BUILTIN ENVIRONMENT VARIABLES
 The environment variables common to all interpreters are described in the
 .Xr loader_simp 8