unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 38240@debbugs.gnu.org
Subject: [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
Date: Wed, 20 Nov 2019 15:10:57 +0100	[thread overview]
Message-ID: <878soaprim.fsf@gnu.org> (raw)
In-Reply-To: <20191119100053.GP15074@E5400> (Efraim Flashner's message of "Tue, 19 Nov 2019 12:00:53 +0200")

Hello!

Efraim Flashner <efraim@flashner.co.il> skribis:

> From 796bf6d1b58d675b04198e536bae62552b16da75 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim@flashner.co.il>
> Date: Sat, 16 Nov 2019 23:33:31 +0200
> Subject: [PATCH] services: sysctl: Make service one-shot.
>
> * gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
> service to use the 'one-shot?' keyword. Remove 'stop' command. Remove
> 'respawn' option.
> ---
>  gnu/services/sysctl.scm | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
> index 5e9e6f0661..2110b80395 100644
> --- a/gnu/services/sysctl.scm
> +++ b/gnu/services/sysctl.scm
> @@ -58,9 +58,8 @@
>          (documentation "Configure kernel parameters at boot.")
>          (provision '(sysctl))
>          (start #~(lambda _
> -                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
> -        (stop #~(const #t))
> -        (respawn? #f))))))
> +                   (invoke #$sysctl "--load" #$sysctl.conf)))
> +        (one-shot? #t))))))

Perhaps we’d rather keep the (zero? (system* …)) idiom here, so that
‘herd start’ gracefully reports failure of ‘sysctl’.

Apart from that, it’s all good to me!  :-)

Ludo’.

  reply	other threads:[~2019-11-20 14:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16 21:42 [bug#38240] [PATCH] services: sysctl: Make service one-shot Efraim Flashner
2019-11-18  8:21 ` [bug#38240] [PATCH v2] " Efraim Flashner
2019-11-19  9:44   ` Ludovic Courtès
2019-11-19  9:57     ` Efraim Flashner
2019-11-19 10:00     ` [bug#38240] [PATCH v3] " Efraim Flashner
2019-11-20 14:10       ` Ludovic Courtès [this message]
2019-11-20 19:24         ` bug#38240: " Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878soaprim.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=38240@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).