:: Re: [DNG] systemd in the era of hot…
Top Pagina
Delete this message
Reply to this message
Auteur: Steve Litt
Datum:  
Aan: dng
Onderwerp: Re: [DNG] systemd in the era of hotplugable devices
On Wed, 22 Jul 2015 16:57:55 +0200
Laurent Bercot <ska-devel@???> wrote:

> On 22/07/2015 16:24, Isaac Dunham wrote:
> > In general, I'd agree with you, but there are some situations where
> > it's possible to argue for hotplugger/service manager integration:
> > if you hotplug a scanner or printer, there's reason to think that
> > the corresponding daemon (sane/cups/lprng/lpr) should start.
>
> Oh, yes, integrating the hotplugger and the service manager is a
> good idea.


Depending on the definition of "integrating".

> But it does not have to be performed as intimately as
> systemd does.


Pre-cisely! I don't have Lennart Poettering's coding skills or system
wisdom, nor do I have the budget by which his team operates, but even I
was able to put together the most challenging part of hotplugging,
using inotifywait:

http://www.troubleshooters.com/linux/init/manjaro_experiments.htm#inotifywait_m_e_createdelete_devusb

The fact that unfunded Steve Litt, a Troubleshooting Trainer by
profession, could do this in an hour, calls into question the necessity
of a necessity of devices and systemd needing to know each others'
business.

inotifywait is Linux only, but I hear there's an equivalent in BSD land.

> It's possible for a hotplug manager to spawn a script
> for certain events and have those scripts make calls to the service
> manager.


Once you're informed of the event, you can do anything. Including
starting an s6 service that's normally down because of a down file.

But it wouldn't be so stylishly Lennart!

Steve

Steve Litt
July 2015 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21