[mythtv-users] Udev rules on upgrade?

Mike Perkins mikep at randomtraveller.org.uk
Fri Jul 21 22:07:07 UTC 2017


On 21/07/17 20:54, Bill Meek wrote:
> On 07/21/2017 12:47 PM, Simon Hobson wrote:
>> Mike Perkins <mikep at randomtraveller.org.uk> wrote:
>>
>>> Now, in the old system I had udev rules to give the tuners repeatable aliases and I'm wondering,
>>> since udev got swallowed by the monster, if they have to be put somewhere else now... or if
>>> anything else in that subsystem has changed.
>>
>> No, AIUI you are now (under systemd law) not allowed to decide for yourself what devices get
>> called what, that decision has been taken for you by LP and his friends at RedHat - because they
>> are so incredibly clever that they know better than any of us how we might want to use our
>> systems. And of course, it's so easy to go and find every instance of eth<something> in all the
>> packages and config files and scripts that use it when something changes - much easier than just
>> changing one line in udev rules :-/ You could try raising a bug report, but they seem to get
>> filtered by the undocumented wontfixd ;-)
>>
>> Have you considered Devuan, the distribution for people that like(d) Debian but want control of
>> their systems ?
>> It still uses udev (but without the systemd screwups) for now, there are people working on
>> alternatives. From my reading of the mailing list, vdev is usable for many devices and they'd like
>> more people testing it - or you can still with the udev you already know (and which worked for you).
>>
>> PS - the Devuan project welcomes all refugees from Debian, those with admin/dev/packaging skills
>> especially welcome.
>>
>
> OK, more off topic ;). but if users prefer not to use
> the "predictable names", then the bottom of this
> page will help:
>
>  https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
>
> For Mike, the following works on my 16.04 box (the subsystem_device
>  and SYMLINK may be backwards, I didn't check):
>
> $ cat /etc/udev/rules.d/hauppauge.rules
> SUBSYSTEM=="dvb", \
>     KERNEL=="dvb?.frontend0", \
>     ATTRS{subsystem_vendor}=="0x0070", \
>     ATTRS{subsystem_device}=="0x7444", \
>     SYMLINK+="dvb/hvr-1600"
>     TAG+="systemd"
>
> SUBSYSTEM=="dvb", \
>     KERNEL=="dvb?.frontend0", \
>     ATTRS{subsystem_vendor}=="0x0070", \
>     ATTRS{subsystem_device}=="0x7911", \
>     SYMLINK+="dvb/hvr-1250"
>     TAG+="systemd"
>
> $ sudo udevadm trigger --subsystem-match=dvb
>
> $ ls -l  /dev/dvb/hvr-*
> lrwxrwxrwx 1 root root 18 Jul 21 14:38 /dev/dvb/hvr-1250 -> adapter1/frontend0
> lrwxrwxrwx 1 root root 18 Jul 21 14:38 /dev/dvb/hvr-1600 -> adapter0/frontend0
>
> See also: https://www.mythtv.org/wiki/Systemd_mythbackend_Configuration
>
I already use something similar to this on the old system, shown below:

# Create a symlink /dev/dvb/adapter-T-0 pointing to Nova T with serial 4034659290
SUBSYSTEM=="dvb", ATTRS{manufacturer}=="Hauppauge", ATTRS{product}=="Nova-T Stick", 
ATTRS{serial}=="4034659290", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter-T-0/%%s 
$${K#*.}'", SYMLINK+="%c"

# Create a symlink /dev/dvb/adapter-T-1 pointing to Nova T with serial 4034657139
SUBSYSTEM=="dvb", ATTRS{manufacturer}=="Hauppauge", ATTRS{product}=="Nova-T Stick", 
ATTRS{serial}=="4034657139", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter-T-1/%%s 
$${K#*.}'", SYMLINK+="%c"

# Create a symlink /dev/dvb/adapter-T2-0 pointing to PCTV 290e with serial 000000104KK5
SUBSYSTEM=="dvb", ATTRS{manufacturer}=="PCTV Systems", ATTRS{product}=="PCTV 290e", 
ATTRS{serial}=="000000104KK5", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter-T2-0/%%s 
$${K#*.}'", SYMLINK+="%c"

(This works perfectly.)

The "Predictable Network Names" don't interest me here since my tuners are USB. The reason I asked 
was because, when I looked in /etc/udev/rules.d the directory was empty, missing the usual 
"70-persistent-network.rules" and "70-persistent-cd.rules". I wondered where they had gone. The web 
page referenced above explains what was decided and why. I'm not going there.

I have also investigated Devuan but, with currently 12 hosts and counting, changing is not an option 
at present, though I might consider a move in the future. It's taken me 8 months so far just to 
upgrade everything I already have from Wheezy to Jessie without breaking anything, the two myth 
boxes being the final step. I don't have  the time for the hassle of moving distributions as well.

-- 

Mike Perkins



More information about the mythtv-users mailing list