Re: [PATCH kmod 15/20] man: modprobe.d: document the config file order handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2024 at 04:05:15PM GMT, Emil Velikov via B4 Relay wrote:
From: Emil Velikov <emil.l.velikov@xxxxxxxxx>

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 copied^Winspired by sysctl.d(5) ;-)

Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
---
The documentation says ".conf", yet the code in libkmod-config.c also
permits for .alias files. I haven't dug through history - is that
intentional? Should we document why - in-code or manual page?

to retain compatibility with the previous project used for loading
modules in Linux, module-init-tools:

                                if (len < 6 ||
                                    (strcmp(&i->d_name[len-5], ".conf") != 0 &&
                                     strcmp(&i->d_name[len-6], ".alias") != 0))
                                        warn("All config files need .conf: %s/%s, "
                                             "it will be ignored in a future release.\n"
                                             filename, i->d_name);

And by "All config files need .conf" I imagine module-init-tools was
doing that to retain compatibility with distros using .alias or because
it was also using the same logic to parse modules.alias from the kernel.
Not sure.

The oldest commit I found referencing this in module-init-tools is:

	commit 50f21358cf9937906f42be1352ba2b588375a344
	Author: Kay Sievers <kay.sievers@xxxxxxxx>
	Date:   Mon Mar 2 13:59:29 2009 +0100

Before that, module-init-tools wouldn't enforce any suffix, but filtered
out the known-bad ones.

I think we can leave that undocumented and maybe 15 years is more than
enough to finally do what the warning said :)

Lucas De Marchi




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux