[systemd-devel] a service depending on a sound card
me at beroal.in.ua
me at beroal.in.ua
Wed Jun 15 14:18:49 UTC 2016
On 15.06.16 16:52, Andrei Borzenkov wrote:
> On Wed, Jun 15, 2016 at 4:12 PM, <me at beroal.in.ua> wrote:
>> 0. When "sound.target" is supposed to be active, when any sound card is
>> active or when all sound cards are active?
> sound.target is started by udev rule when any device that belongs to
> "sound" subsystem appears. In general it can be used to avoid starting
> sound-related services unconditionally if no hardware is present (i.e.
> - make then to be WantedBy sound.target). It does not offer any
> promises regarding order in which services are started.
Thank you, it is clear now.
>
>> 1. Why the service starts when Card 0 is inactive?
> After is effective only between concurrent jobs. To make systemd
> respect After in this case you need to make sure corresponding job to
> "start" device is also queued every time your service is started. It
> makes sense to use BindsTo for it - it also makes sure service is
> stopped when device disappears.
What is a "job to "start" device"? I don't understand. A device unit
becomes active because the corresponding device exists, I guess. My
service is started because
{{{
[Install]
WantedBy=multi-user.target
}}}
More information about the systemd-devel
mailing list