adding devices to udev blacklist

Adam Laurie adam at algroup.co.uk
Mon Oct 7 09:50:10 UTC 2013


On 07/10/13 09:47, Martin Pitt wrote:

> Right. It's better to copy the file to /etc with a different(!) file
> name, take out all the actual rules and just add your own, so that you
> get both the original rules and your new one. E. g. create
> /etc/udev/rules.d/78-mm-usb-device-blacklist-local.rules with
>
> ------------- 8< --------------
> ACTION!="add|change", GOTO="mm_usb_device_blacklist_local_end"
> SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_local_end"
> ENV{DEVTYPE}!="usb_device",  GOTO="mm_usb_device_blacklist_local_end"
>
> ATTRS{idVendor}=="2d2d" ATTRS{idProduct}=="504d", ENV{ID_MM_DEVICE_IGNORE}="1"
>
> LABEL="mm_usb_device_blacklist_local_end"
> ------------- 8< --------------
>
> (See "man udev" for where udev rules are searched and how overriding
> existing rules works)

Hi Martin,

Thanks for the answer, and that's an approach I've taken with other 
projects, but we'd rather the user didn't have to take any action at all 
- i.e. the entry was already there... After all, every other device in 
the original file 
/etc/udev/rules.d/78-mm-usb-device-blacklist-local.rules got there 
somehow, so why not ours?

cheers,
Adam
-- 
Adam Laurie                         Tel: +44 (0) 20 7993 2690
Suite 117                           Fax: +44 (0) 20 7691 7776
61 Victoria Road
Surbiton
Surrey                              mailto:adam at algroup.co.uk
KT6 4JX                             http://rfidiot.org



More information about the ubuntu-devel mailing list