I went with '$kernel' in the end (-"The kernel name for this device"-),
rather than '$parent'. It looks something like this:
Code:
--------------------
1-1.3.1
--------------------
It meant that it took less effort to create, after boot, the text in the
file that is checked by the 'remove' script, because that text is
embedded in the dmesg line:
Code:
--------------------
[ 137.807134] usb 1-1.3.1: New USB device found, idVendor=08bb,
idProduct=2704, bcdDevice= 1.00
--------------------
So now, on boot, if the DAC is ready before Squeezelite, I create my
text file using a script that extracts the kernel name from dmesg. If
the DAC isn't there at boot, that file will be empty, but will be
created by the script that runs when udev detects that the DAC has
appeared. The udev 'remove' rule then watches for any USB device
disappearing, and checks its $kernel value against the text in the file.
When they match, it stops Squeezelite.
In practice it seems to work well - the Squeezelite player now appears
and disappears in sync with the DAC powering on and off, so my remaining
synced players are only briefly interrupted when Squeezelite starts.
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=113661
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix