:: Re: [DNG] removing unwanted bluetoo…
Góra strony
Delete this message
Reply to this message
Autor: Rainer Weikusat
Data:  
Dla: dng
Temat: Re: [DNG] removing unwanted bluetooth
Rainer Weikusat <rainerweikusat@???> writes:

[...]

>> 3.1] create a file /etc/modprobe.d/bluetooth.conf
>> #+BEGIN_SRC
>> blacklist bluetooth
>> blacklist bnep
>> blacklist btusb
>> #+END_SRC
>
> According to the modprobe.d documentation,
>
>     the blacklist keyword indicates that all of that particular
>     module's internal aliases are to be ignored.

>
> This means blacklisting doesn't prevent the module from being loaded, it
> should prevents it from being automatically loaded for any feature it
> claims to implement. Eg, bluetooth.ko has an internal alias
>
> net-pf-31
>
> and blacklisting it would mean it won't be loaded to provide net-pf-31
> just because of the internal alias alone. But if would be loaded if
> someone defined an alias
>
> alias net-pf-31 bluetooth
>
> in some other file.


While the documentation says this, it's not actually true: Judging from
tests and from the modprobe source code, a

blacklist bluetooth

means the named module won't be loaded if modprobe determined its name
by resolving an alias. The -b option can be used to to apply the
blacklist to module names, too, ie, a

modproble bluetooth

would succeed despite the blacklist entry while a

modprobe -b bluetooth

wouldn't.

> It should be possible to use something like
>
> install bluetooth /bin/true
>
> in a modprobe conf file instead.


This will prevent both direct and indirect loads of the module unless
the -i option is also passed to modprobe.