[systemd-devel] Service reactivation with device plugging

Rob Spanton rspanton at zepler.net
Tue Jul 3 16:49:58 PDT 2012


Hi,

I wrote:
> I was recently working on an embedded system that had a daemon
> [ ...which] needed to be run when both [serial] devices were plugged
> in.  If any of the devices was unplugged, the daemon would exit, and
> would need to be restarted the next time both devices were plugged in.

Auke wrote:
> why not write a middle-man layer that uses socket activation?

My understanding of socket activation is that it is for starting a
service when something attempts to connect to a socket.  I don't
understand how this relates to my situation with two serial devices.

> alternatively, you could use inotify and immediately start your
> daemon.

Presumably you mean by writing a second daemon that uses inotify?  Yes,
I can see that this would solve my problem, however I was wondering
whether there was a simpler way of doing it just using systemd.

Cheers,

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120704/57ed2ea0/attachment.pgp>


More information about the systemd-devel mailing list