[mythtv-users] Udev rules get mixed-up

Hika van den Hoven hikavdh at gmail.com
Wed Sep 17 18:12:30 UTC 2014


Hoi Yianni,

Wednesday, September 17, 2014, 7:29:03 PM, you wrote:

> al2kpro:~ # udevadm trigger --subsystem-match="dvb" -vv
> /sys/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2.2/dvb/dvb5.demux0
> /sys/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2.2/dvb/dvb5.dvr0
> /sys/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2.2/dvb/dvb5.frontend0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb0.demux0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb0.dvr0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb0.frontend0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb0.net0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb1.demux0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb1.dvr0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb1.frontend0
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/dvb/dvb1.net0

If I look at the above there is almost no difference between the first
and second adaptor.

> SUBSYSTEM=="dvb", \
>   ATTRS{device}=="0x8852", \
>   ATTRS{subsystem_vendor}=="0x6981", \
>   PROGRAM="/bin/sh -c ' K=%k; K=$${K#dvb}; N=$${K#*.}; \
>     if [ ! -e /dev/dvb/adapter_t1/$N ] ; \
>     then printf dvb/adapter_t1/%%s $${K#*.}; \
>     else printf dvb/adapter_t2/%%s $${K#*.}; \
>     fi ; \
>     exit 0'", SYMLINK+="%c"

If I look at this rule (I made it a bit more readable) it is in
essence 'first come first get'. The first demux to initialise gets
placed in 'adapter_t1' the second in 'adapter_t2'. The same for the
other devices. Obviously they initialise in parallel, creating the
mixup.
I assume that the distinction between dvb0 and dvb1 is made on the
hardware order, if not, if this is also based on 'first come first
get' there is, as I see it no way to distinguish the two adaptors.
My next assumption is that the distinction between adaptor0 and
adaptor1 is equal to the distinction between dvb0 and dvb1. So any
udev-rule can not add anything in the distinction.

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list