From mboxrd@z Thu Jan 1 00:00:00 1970 From: znavko@disroot.org Subject: Re: One-shot Shepherd services Date: Fri, 19 Apr 2019 04:09:10 +0000 Message-ID: <698ac3b63c0c8106a94b6bf1f15526d0@disroot.org> References: <87ftqfngda.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHKqI-0001n9-Ba for guix-devel@gnu.org; Fri, 19 Apr 2019 00:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHKq0-0007KO-My for guix-devel@gnu.org; Fri, 19 Apr 2019 00:09:38 -0400 In-Reply-To: <87ftqfngda.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= , Guix-devel Is there possibility to define dependencies? F.e. networking will depend = on my on-eshot service?=0AAlso what is service 'networking' really is, an= d can I use wpa-supplicant + dhcp-client without meta-service networking?= =0A=0AApril 18, 2019 9:39 PM, "Ludovic Court=C3=A8s" wrote= :=0A=0A> Hello Guix!=0A> =0A> Today I added support for =E2=80=9Cone-shot= =E2=80=9D services in the Shepherd:=0A> =0A> https://git.savannah.gnu.org= /cgit/shepherd.git/commit/?id=3Dc121eedfff7a50feddcf08e173d2b0dd807e8804= =0A> =0A> One-shot services start, perform a short action, and are immedi= ately=0A> marked as =E2=80=9Cstopped.=E2=80=9D (systemd has something sim= ilar:=0A> .)=0A> =0A> The use case is initialization or cleanup actions lik= e the =E2=80=98user-homes=E2=80=99=0A> service. So far =E2=80=98user-home= s=E2=80=99 is a regular service whose =E2=80=98start=E2=80=99 method=0A> = always fails; as a result, we always see this message:=0A> =0A> Service u= ser-homes could not be started.=0A> =0A> From there on, we=E2=80=99ll be = able to mark this service as one-shot (patch=0A> below), and thus shepher= d will notice that it successfully started (or=0A> not) and yet mark it a= s stopped, which was always the intent.=0A> =0A> There are other cases wh= ere this could be useful. For instance, we=0A> could turn service activat= ion snippets into one-shot services.=0A> =0A> Since this augments the She= pherd API, I plan to release it as 0.6.0=0A> in time for Guix 1.0. It con= tains other rather minor changes compared=0A> to 0.5.0.=0A> =0A> Feedback= welcome!=0A> =0A> Ludo=E2=80=99.