[systemd-devel] service dependency on udev

Andrei Borzenkov arvidjaar at gmail.com
Wed Apr 20 03:41:08 UTC 2016


20.04.2016 04:27, Flavio Leitner пишет:
> On Wed, Apr 20, 2016 at 05:34:49AM +0900, Greg KH wrote:
>> On Tue, Apr 19, 2016 at 05:25:09PM -0300, Flavio Leitner wrote:
>>>
>>> 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?
>>
>> How do you define "all the devices"?  That's not very event driven,
>> which is the issue you are probably having here.
> 
> When the vswitch starts, it will look for the interfaces configured
> in the database and will try to add them to the data path.  If the
> device is not present (yet) it is considered an error.
> 

Well, if this is normal service it will be run after device coldplugging
anyway, which is as close to "all devices have been processed by udev"
as you can get. You may want to make sure systemd-udev-settle.service is
used by your distribution.

>> Why not just trigger your service after the needed network device is
>> found?
> 
> Well, it can be for multiple devices as well.
> 

But that sounds more like something your vswitch has to handle itself.
What about PCI hotplug to add/replace interfaces?


More information about the systemd-devel mailing list