Re: systemd: How to wait for a device before starting a service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 06, 2012 at 02:55:35PM -0600, Richard Shaw wrote:
> Ok, I didn't know how to make the subject any shorter, but there's a
> big BUT in this, but (hehe) first a summary.
> 
> I have a user of MythTV that has capture devices which require a
> firmware be uploaded. As a consequence, the /dev paths are not always
> created by the time mythbackend tries to start. A solution to this is
> to create a mythbackend.path unit file which will wait for the devices
> to be created, BUT, they occasionally fail to initialize and the path
> unit file doesn't seem to have a timeout option (or option for what to
> do once the timeout is reached).
> 
> A partial solution would be to use a timer unit file, but it too
> doesn't do quite what I need. It doesn't appear that I can wait for
> the start of one unit file (mythbackend.path) while starting a
> different unit file (mythbackend.service) once the timeout is reached.
> 
> I could use the same 'After=...' as I have on the main service file
> which would approximate the same startup time, but that's rather
> hackish. I am assuming that having two unit files (a path and a timer)
> trying to start the same service isn't an issue and that the first one
> wins.

We use the following for the libguestfs live service:

http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=blob;f=99-guestfsd.rules;h=ab4f6800bbd847307aceb2cb52e984524eaee52c;hb=HEAD

http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=blob;f=guestfsd.service;h=482d1e2bf1fb1c791e3adfe3f58716c38edb6b3d;hb=HEAD

HTH,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux