Message ID | 20191118082111.GF15074@E5400 |
---|---|
State | Accepted |
Headers | show |
Series | [bug#38240,v2] services: sysctl: Make service one-shot. | expand |
Hello, Efraim Flashner <efraim@flashner.co.il> skribis: > Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר > GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 > Confidentiality cannot be guaranteed on emails sent or received unencrypted > > From fa6ed7c614d2b3e42fbcb44878b69ebda37f23e7 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 '--one-shot' flag. Remove 'stop' command. Remove > 'respawn' option. > --- > gnu/services/sysctl.scm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm > index 5e9e6f0661..e59e345189 100644 > --- a/gnu/services/sysctl.scm > +++ b/gnu/services/sysctl.scm > @@ -58,9 +58,7 @@ > (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")))))))) I think you also need to add (one-shot? #t), right? Thanks, Ludo’.
On Tue, Nov 19, 2019 at 10:44:27AM +0100, Ludovic Courtès wrote: > Hello, > > Efraim Flashner <efraim@flashner.co.il> skribis: > > > Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר > > GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 > > Confidentiality cannot be guaranteed on emails sent or received unencrypted > > > > From fa6ed7c614d2b3e42fbcb44878b69ebda37f23e7 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 '--one-shot' flag. Remove 'stop' command. Remove > > 'respawn' option. > > --- > > gnu/services/sysctl.scm | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm > > index 5e9e6f0661..e59e345189 100644 > > --- a/gnu/services/sysctl.scm > > +++ b/gnu/services/sysctl.scm > > @@ -58,9 +58,7 @@ > > (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")))))))) > > I think you also need to add (one-shot? #t), right? > Indeed. I'm also pretty sure that I don't want the '--one-shot' flag that I copied from cuirass.
diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm index 5e9e6f0661..e59e345189 100644 --- a/gnu/services/sysctl.scm +++ b/gnu/services/sysctl.scm @@ -58,9 +58,7 @@ (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")))))))) (define sysctl-service-type (service-type