Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] update-modules and modules.d -> modprobe.d
Date: Sun, 23 Mar 2008 00:18:04
Message-Id: 200803222020.17591.vapier@gentoo.org
1 just a little background for the (bi)curious
2
3 modutils-2.4.x provided a way for the user to customize
4 things: /etc/modules.conf. here users could control aliases and options and
5 do all sort of neat tricks when loading/unloading modules. the problem was
6 that it didnt allow for packages to easily provide their own little snippets.
7 should all those packages get folded into modules.conf ? should you just
8 grep/cat the file onto modules.conf ? it's a nightmare.
9
10 so distros invented /etc/modules.d/. now packages could manage their little
11 pieces in this directory all by themselves. the only problem was that
12 modutils knew nothing of this. it only knew modules.conf. so distros had to
13 write a little bit of glue where the conf file would be autogenerated by all
14 the pieces in modules.d. life, while better, is still kind of a pain.
15
16 when module-init-tools-2.6.x came out, peeps had learned from the past. this
17 means they changed two things: they included native support for a modprobe.d
18 directory and they removed support for certain syntax deemed a pita. this
19 syntax change is why we have a new modprobe.d instead of just using the old
20 modules.d. however, the behavior is this: if /etc/modprobe.conf exists, use
21 that, otherwise scan the modprobe.d directory.
22
23 now distros have yet another problem. they've got packages that provide old
24 snippets in /etc/modules.d/ and new snippets in /etc/modprobe.d/. so in
25 comes the lube again. we automatically combine these directories and form an
26 old-compatible modules.conf file and a new compatible modprobe.conf. what
27 would be ideal is for all of this lube to go away. thus the latest
28 update-modules script whines like a brat whenever a file is found
29 in /etc/modules.d/. by being proactive here and scuttling all the modules.d
30 pieces, we will be left with only /etc/modprobe.d/. that means no more
31 annoying messages during boot "Updating modules.xxxx ..." which serves to
32 slow things down. on my amd64 system with very few files, that still takes
33 ~2 friggin seconds.
34
35 less stuff to do at boot => faster boot time => maintainers get a whiny notice
36 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature