File man-modprobe.d-document-the-config-file-order-handling.patch of Package kmod.41809
From 11d09ac414bd706ea4a7bf923240655909195da4 Mon Sep 17 00:00:00 2001
From: Emil Velikov <emil.l.velikov@gmail.com>
Date: Mon, 8 Jul 2024 14:43:19 +0100
Subject: [PATCH] man: modprobe.d: document the config file order handling
Patch-mainline: v33
Git-commit: 11d09ac414bd706ea4a7bf923240655909195da4
The modprobe.d configuration order/handling aligns with existing tools
such as sysctl.d, even though there is no mention in the manual.
Reorder the list in SYNOPSIS and add a bit of verbiage describing things.
Section is inspired by sysctl.d(5) and sysctl(8).
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---
man/modprobe.d.5.scd | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
--- a/man/modprobe.d.xml
+++ b/man/modprobe.d.xml
@@ -40,23 +40,20 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/lib/modprobe.d/*.conf</filename></para>
- <para><filename>/usr/lib/modprobe.d/*.conf</filename></para>
- <para><filename>/usr/local/lib/modprobe.d/*.conf</filename></para>
- <para><filename>/run/modprobe.d/*.conf</filename></para>
<para><filename>/etc/modprobe.d/*.conf</filename></para>
+ <para><filename>/run/modprobe.d/*.conf</filename></para>
+ <para><filename>/usr/local/lib/modprobe.d/*.conf</filename></para>
+ <para><filename>/usr/lib/modprobe.d/*.conf</filename></para>
+ <para><filename>/lib/modprobe.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1><title>DESCRIPTION</title>
<para>Because the <command>modprobe</command> command can add or
remove more than one module, due to modules having dependencies,
we need a method of specifying what options are to be used with
- those modules. All files underneath the
- <filename>/etc/modprobe.d</filename> directory which end with the
- <filename>.conf</filename> extension specify those options as
- required. They can also be used to create convenient aliases:
+ those modules. One can also use them to create convenient aliases:
alternate names for a module, or they can override the normal
<command>modprobe</command> behavior altogether for those with
special requirements (such as inserting more than one module).
</para>
<para>
@@ -73,6 +70,21 @@
</para>
</refsect1>
+ <refsect1><title>CONFIGURATION DIRECTORIES AND PRECEDENCE</title>
+ <para>
+ Configuration files are read from directories in listed in SYNOPSYS in that
+ order of precedence. Once a file of a given filename is loaded, any file of the
+ same name in subsequent directories is ignored.
+ </para>
+ <para>
+ All configuration files are sorted in lexicographic order, regardless of the
+ directory they reside in. Configuration files can either be completely replaced
+ (by having a new configuration file with the same name in a directory of higher
+ priority) or partially replaced (by having a configuration file that is ordered
+ later).
+ </para>
+ </refsect1>
+
<refsect1><title>COMMANDS</title>
<variablelist>
<varlistentry>