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

Disabling autoload of wlan module?



hiya

(Short version: How do I disable the autoloading of ipw2200 without
                crippling my system?)


Okay, I have a nice little netenv setup on my laptop which lets me choose between a dhcp-, a wlan-, a static network configuration and
none at all. The latter one is specifically for working outdoor.

In a quest to reduce power consumption I am trying to disable the loading of ipw2200 except when explicitely loading netenv/wlan.
(Calling `modprobe ipw2200` at the appropriate place)


Things that didn't work at all:

´---------------------------------------------
| skip ipw2200
`-- /etc/discover.d/powersave

´---------------------------------------------
| ipw2200
`-- /etc/hotplug/blacklist.d/powersave

´---------------------------------------------
| blacklist ipw2200
`-- /etc/modprobe.d/blacklist

´---------------------------------------------
| alias ipw2200 off
`-- /etc/modutils/local-powersave

 (The last one is quite stupid, but was worth a try.)


The reason as far as I understood is that the module is not called as part of an alias defined under /etc/modules, but via an auto-generated pci-alias defined in /lib/modules/<kvers>/modules.alias.

But maybe that's a wrong asumption, since
´---------------------------------------------
| alias pci:.... off
`-- /etc/modutils/local-powersave
accompanied by /etc/discover.d/powersave didn't do anything either.
(Compared the wildcard from /lib/modules/<kver>/modules/alias with
 the data from /sys/bus/pci/.../uevent to find the appropriate alias
 to disable.)

Things that did work:
´---------------------------------------------
| install ipw2200 /bin/true
`-- /etc/modutils/local-powersave

Too well. Well the module wasn't autoloaded, but manual loading isn't possible either. Obviously.


I'm looking for a nice and clean way to disable autoloading. Just autoloading. I do not want to remove the module from the kernel tree because I need it from time to time. I do not like to do an rmmod, because that feels like a kludge.


So - how do you guy do this? How to propery load/not load modules
based (loosely) on your environment?


SystemFacts:
  - Kernel 2.6.24 & 2.6.25, custom config
  - Debian Etch
  - udev, discover (unmodified)
  - netenv, dhcp3-client, wpa_supplicant (unmodified)

thomas


Reply to: