segunda-feira, 14 de julho de 2008

Conflict with ndiswrapper and ssb

I'm using ndiswrapper and the windows propietary driver to enable my wireless card, since the available free driver is not good enough. The problem I was having is that when I activated the ndiswrapper module, the card didn't work, cause it was already being managed by ssb. I tried adding ssb to /etc/modprobe.d/blacklist, but it didn't work because it was being loaded in the initrd.

So I had two choices: I could change the initrd or remove this module after boot, and I chose the second one. The cleanest way I found to do this was create a ndiswrapper script in /etc/init.d/ with the content:
$ cat /etc/init.d/ndiswrapper
#! /bin/sh
### BEGIN INIT INFO
# Provides: ndiswrapper
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: enable to load ndiswrapper
# Description: enable to load ndiswrapper
### END INIT INFO

rmmod ssb
modprobe ndiswrapper
modprobe ssb
It's important to use:
# chmod +x /etc/init.d/ndiswrapper
So that permissions be like this:
$ ls -l /etc/init.d/ndiswrapper
-rwxr-xr-x 1 root root 278 Jul 13 10:06 /etc/init.d/ndiswrapper
Then, it's just creating a link to it in /etc/rc2.d/ :
# ln -s /etc/init.d/ndiswrapper /etc/rc2.d/S99ndiswrapper

Nenhum comentário: