[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One-shot Shepherd services
From: |
znavko |
Subject: |
Re: One-shot Shepherd services |
Date: |
Fri, 19 Apr 2019 04:09:10 +0000 |
Is there possibility to define dependencies? F.e. networking will depend on my
on-eshot service?
Also what is service 'networking' really is, and can I use wpa-supplicant +
dhcp-client without meta-service networking?
April 18, 2019 9:39 PM, "Ludovic Courtès" <address@hidden> wrote:
> Hello Guix!
>
> Today I added support for “one-shot” services in the Shepherd:
>
> https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=c121eedfff7a50feddcf08e173d2b0dd807e8804
>
> One-shot services start, perform a short action, and are immediately
> marked as “stopped.” (systemd has something similar:
> <https://www.freedesktop.org/software/systemd/man/systemd.service.html>.)
>
> The use case is initialization or cleanup actions like the ‘user-homes’
> service. So far ‘user-homes’ is a regular service whose ‘start’ method
> always fails; as a result, we always see this message:
>
> Service user-homes could not be started.
>
> From there on, we’ll be able to mark this service as one-shot (patch
> below), and thus shepherd will notice that it successfully started (or
> not) and yet mark it as stopped, which was always the intent.
>
> There are other cases where this could be useful. For instance, we
> could turn service activation snippets into one-shot services.
>
> Since this augments the Shepherd API, I plan to release it as 0.6.0
> in time for Guix 1.0. It contains other rather minor changes compared
> to 0.5.0.
>
> Feedback welcome!
>
> Ludo’.