Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149568 - Customizing auto loaded modules based on softlevel
Summary: Customizing auto loaded modules based on softlevel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-29 15:25 UTC by Vincent Poinot
Modified: 2006-11-10 06:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patched /etc/init.d/modules (modules,2.99 KB, text/plain)
2006-09-29 15:28 UTC, Vincent Poinot
Details
diff modules modules.original (modules.diff,375 bytes, text/plain)
2006-09-30 04:20 UTC, Vincent Poinot
Details
diff -u modules.original modules.new (modules.diffu,601 bytes, text/plain)
2006-10-11 23:12 UTC, Vincent Poinot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Poinot 2006-09-29 15:25:55 UTC
Hi,

I would like to suggest what I consider a enhancement, albeit minor, to the way modules are auto loaded. I could not find a way to load different modules according to the selected runlevel, so I slightly modified /etc/init.d/modules so that:
- it first try a file /etc/modules.autoload/<kernel>.<softlevel>
- if this file does not exist, it then proceed as usual with /etc/modules.autoload/<kernel>

Motivation:
- I have an "offline" runlevel that I use when I am on the road. I noticed that if I autoload the module for my WiFi card (ipw2200), it automatically connects to possible open access points, which I don't want. Using the trick I suggest, I use a file kernel-2.6.offline that doesn't contain ipw2200, and I am *really* offline...
- Well, it seems to me that it fits the Gentoo spirit.
Comment 1 Vincent Poinot 2006-09-29 15:28:37 UTC
Created attachment 98410 [details]
Patched /etc/init.d/modules

As you can see, I only changed a few lines in the start() function, when it comes to the "autoload" variable.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-09-29 16:09:38 UTC
Could you supply a diff please?
Comment 3 Vincent Poinot 2006-09-30 04:20:13 UTC
Created attachment 98435 [details]
diff modules modules.original

Sure, here it is.
(I am not very good at diff/patch, so feel free to ask again if this is not exactly what you expected)
Comment 4 SpanKY gentoo-dev 2006-10-06 21:18:07 UTC
lets see ... good idea, comments on your patch:
 - use `diff -u` when posting to bugzilla
 - do not quote inside of [[ ... ]]
Comment 5 Vincent Poinot 2006-10-11 23:12:57 UTC
Created attachment 99408 [details]
diff -u modules.original modules.new

Here is a new diff:
- correct format (-u)
- correct order of arguments: old file, new file (according to Gentoo dev doc)

I did not remove the double quotes because I don't understand why they are harmful. I welcome any explanation :-)
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-11-10 06:50:32 UTC
Thanks for the patch, this is in baselayout-1.13.0_alpha6