automatic actions when a usb bluetoothdongle is plugged in [dapper]

Jan Falkenhagen spam.to.f at lkenhagen.de
Sat Apr 22 11:05:35 UTC 2006


Am Samstag, den 22.04.2006, 11:30 +0200 schrieb Jan Falkenhagen:
> > Indeed.  It's now done in udev, much more flexibly.
> 
> but how? i cant find any documentation on this.
> jan

ok, i found some documentation on how one could automatically mount
usb-mass storage devices on insert, and modified the rules to do what i
need:

KERNEL=="hci0", NAME="%k", SYMLINK+="hci%m"
ACTION=="add", KERNEL=="hci[0-9]", RUN+="/sbin/modprobe -Qba snd-bt-sco"
ACTION=="add", KERNEL=="hci[0-9]", RUN+="/usr/sbin/hciconfig hci%m voice
0x0060"
ACTION=="remove", KERNEL=="hci[0-9]", RUN+="/sbin/rmmod snd-bt-sco"

well now it works, so it cant be all wrong. But i really would like to
know if something im doing in this rules would be redundant or even
dangerous.

Jan





More information about the ubuntu-users mailing list