Re: How to trigger a udev rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Thomas,

funny that you ask, a few days ago someone asked exactly the same
thing in #udev.

Thomas Bechtold [2011-03-03  7:21 +0100]:
> ### only check /dev/ttyS1 (atmel_usart.1) for modem ###
> ACTION!="add|change", GOTO="mm_platform_device_whitelist_end"
> SUBSYSTEM!="platform", GOTO="mm_platform_device_whitelist_end"
> DRIVERS=="atmel_usart",KERNELS=="atmel_usart.1",ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
> LABEL="mm_platform_device_whitelist_end"

I'm afraid udevadm trigger doesn't support the same parental matching
as udev rules themselves do, so I don't think there can be a precise
trigger unless you already know the corresponding /dev/ttySn device
node. If you do, then just do

  udevadm trigger --sysname-match=ttySn

If you dont, it shouldn't matter much to trigger all ttyS devices:

  udevadm trigger --sysname-match=ttyS*

BTW, you can also try with --verbose --dry-run (also works as user) to
see what it would do, and refine the match until it works to your
needs.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux