[systemd-devel] service dependency on udev

Lennart Poettering lennart at poettering.net
Wed Apr 20 09:26:19 UTC 2016


On Tue, 19.04.16 17:25, Flavio Leitner (fbl at sysclose.org) wrote:
1;4401;0c
> 
> Hello,
> 
> I have a service that needs to start after all the devices (network
> cards at least) have been properly processed by udev.  Pretty much
> like the old 'network' sysv script.
> 
> Any suggestion?

There is not concept of "all devices have shown" up. Today's devices
can take any time they want before they pop up, are probed and show up
in userspace. In particular with technologies like USB there's no way
to know in advance that there will be a device popping up, and how
much time it will take. This also means there's no reasonable way to
wait for all devices to have shown up, simply since you wouldn't know
how long to wait, and whether to wait at all.

Or in other words: if you software requires a concept it is not
compatible with how systems work today. Today, software really should
use libudev or suchlike and subscribe to events as hardware pops up,
and then make use of those events and react dynamically to that and
make the best of it.

Sorry if that's disappointing, but it really is how it is.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list