openrc-discuss

Re: /etc/init.d/modules -- What module lists are loaded

Roy Marples

Tue Jan 19 14:30:54 2010

On 17/01/2010 14:40, Trevor Smith wrote:
I see at the moment that OpenRC's module script loads ONLY the modules
that match the first variable found in "$KV",
$KV_MAJOR.$KV_MINOR.$KV_MICRO, $KV_MAJOR.$KV_MINOR, then $modules. I
am wondering if this behavior could be changed so as to load ALL the
modules that match a given kernel version (e.g. a kernel named
linux-2.6.31 would load modules from linux-2.6.31, 2.6.31, 2.6 and
modules). I think this would be very useful so as to avoid duplication
in the /etc/conf.d/modules file.

The idea is that you have a generic modules="foo" configuration that is overridden by more specific kernel versions. ie, some modules may cause issues so you exclude them.

You can also use the language of shell to avoid duplication

mymods="foo bar"
broken="fubar"
modules_2_6="$mymods $broken"
# .31 has broken mods
modules_2_6_31="$modules"

Thanks

Roy

References:
/etc/init.d/modules -- What module lists are loadedTrevor Smith
Archive administrator: postmaster@marples.name