I'm trying to programatically stomp on bluetooth on RHEL5.
I've got the service stopped -- no problem. Also no problem on
rpm -e for the associated bluetooth packages, bluez-*.
ps -aef | grep -v grep | egrep -c '(sdpd|hcid)'
returns zero , so I know the daemons are gone.
For some reason, I just can't get the modules to unload.
modprobe -rv keeps saying they're in use.
Dependencies look like this:
bluetooth -> bnep -> l2cap -> rfcomm -> hidp -> rfcomm -> hidp
But, even starting at the top so that dependencies are simple,
modprobe -rv bluetooth returns FATAL: Module bluetooth is in use.
So, how do I find out what processes are using this module? It doesn't seem to be in /proc/modules, or lsof.
lsof still shows something hooked.
# lsmod | egrep '(bnep|hidp|rfcomm|l2cap|bluetooth)' bnep 82241 0 hidp 83521 0 rfcomm 104809 0 l2cap 89281 5 bnep,hidp,rfcomm bluetooth 118597 4 bnep,hidp,rfcomm,l2cap