[vdr] VDR needs some way to detect new tuners on runtime...
Klaus.Schmidinger at tvdr.de
Tue Aug 20 10:12:25 CEST 2013
On 19.08.2013 23:19, Manuel Reimer wrote:
> with event based init systems (in my case systemd) it seems to become a big issue to startup VDR.
> If you install VDR on a SSD device, then startup gets *really* fast. Sometimes that fast, that VDR starts before all devices are initialized.
> I've asked in the systemd mailinglist, if there is any way to get around this:
> The result: The "daemon" (VDR) needs some way to detect devices while runtime.
> So my question to Klaus: Is there something like this planned or would a patch be accepted which adds a feature like this? As far as I know a new dependency (libudev) would be needed.
I wouldn't like to add a dependency to libudev.
Besides, VDR assumes that all devices are "there" when it starts, mostly
because some configuration details (like device bonding or DiSEqC) rely
on the fact that the devices appear in a given, reproducible sequence.
"udev" rules can be used to assign particular adapter numbers to the devices.
Maybe there is also some mechanism to make it wait until all devices
have been initialized.
As a very simple approach something like
while [[ `find /dev/dvb -name 'adapter*' | wc -l` -lt $NUMADAPTERS ]]; do sleep 1; done
could be used to count the number of adapters, and check that number in a loop
against the expected number of adapters.
More information about the vdr