/etc/init.d/modules doesn't consider all the modules listed in /etc/conf.d/modules According to [1] the "configuration allows for fine grained control over the modules and parameters based on kernel version". Reading the comments in Code Listing 2.3 I get the impression that modules listed in ${modules} will be loaded regardless of the kernel version, modules listed in ${modules_2_6} will be loaded for any kernel in the 2.6 branch, and so on. It seems that the list of loaded modules is cumulative, i.e. if I have, say, kernels 2.6.29 and 2.6.28 then if I boot 2.6.29 kernel the modules from ${modules}, ${modules_2_6}, and ${modules_2_6_29} will be loaded. If I boot a 2.6.28 kernel then the modules from ${modules}, ${modules_2_6}, and ${modules_2_6_28} will be loaded. Unfortunately, this is not what happens. /etc/init.d/modules doesn't accumulate the modules listed. It scans the variables from the most specific to the least specific, i.e. from ${KV} to ${modules} and stops at the first one found: local list= x= xx= y= args= mpargs= cnt=0 a= for x in "${KV}" \ ${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \ ${KV_MAJOR}.${KV_MINOR} \ ; do eval list=\$modules_$(shell_var "${x}") [ -n "${list}" ] && break done [ -z "${list}" ] && list=${modules} With this approach one has to put the modules that are common to multiple kernel versions into a variable specific to that kernel. This produces lots of duplicate stuff in /etc/conf.d/modules and becomes tedious to maintain. I propose to change the above code to something that makes the duplication unnecessary and resembles the description in [1]. A patch is attached. [1] http://www.gentoo.org/doc/en/openrc-migration.xml#doc_chap2_sect3 Reproducible: Always Steps to Reproduce:
Created attachment 190889 [details, diff] Initial patch
The intended behavior of the modules config file is correct as is. Please see: http://roy.marples.name/archives/openrc-discuss/2010/0073.html I think the documentation at http://www.gentoo.org/doc/en/openrc-migration.xml#doc_chap2_sect3 does suggest that all 'matching' variables load their modules and that is incorrect. I suggest this ticket should be changed to be in the 'Documentation' Component. Then the GDP can decide what changes should be made to the document. Thoughts? Thanks. Trevor
Docs team, I agree with comment #2 in this bug. The openrc migration guide implies that the modules* variables in /etc/conf.d/modules are cumulative, but this is not correct. What actually happens is, the more version specific variables override the more general ones. Thanks, William
I can't really say that I like it, but it's, of course, an equally fine solution to the problem. Code Listing 2.3 in the migration guide has to be fixed then. Cheers, Renat
Fixed in CVS.