* [bug#38240] [PATCH] services: sysctl: Make service one-shot.
@ 2019-11-16 21:42 Efraim Flashner
2019-11-18 8:21 ` [bug#38240] [PATCH v2] " Efraim Flashner
0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2019-11-16 21:42 UTC (permalink / raw)
To: 38240; +Cc: Efraim Flashner
* gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
service to use '--one-shot' flag. 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..1f1cf38195 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))))))
+ (zero? (system* #$sysctl "--load" #$sysctl.conf "--one-shot"))))
+ (stop #~(const #t)))))))
(define sysctl-service-type
(service-type
--
2.24.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#38240] [PATCH v2] services: sysctl: Make service one-shot.
2019-11-16 21:42 [bug#38240] [PATCH] services: sysctl: Make service one-shot Efraim Flashner
@ 2019-11-18 8:21 ` Efraim Flashner
2019-11-19 9:44 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2019-11-18 8:21 UTC (permalink / raw)
To: 38240
[-- Attachment #1.1: Type: text/plain, Size: 376 bytes --]
After looking at the 'user-homes' commit to switch that to a one-shot
service, I've made a small change to the patch. (Namely, I removed the
'stop' command).
--
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
[-- Attachment #1.2: 0001-services-sysctl-Make-service-one-shot.patch --]
[-- Type: text/plain, Size: 1052 bytes --]
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"))))))))
(define sysctl-service-type
(service-type
--
2.24.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#38240] [PATCH v2] services: sysctl: Make service one-shot.
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
0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-11-19 9:44 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 38240
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’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#38240] [PATCH v2] services: sysctl: Make service one-shot.
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
1 sibling, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2019-11-19 9:57 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38240
[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]
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.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
2019-11-19 9:44 ` Ludovic Courtès
2019-11-19 9:57 ` Efraim Flashner
@ 2019-11-19 10:00 ` Efraim Flashner
2019-11-20 14:10 ` Ludovic Courtès
1 sibling, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2019-11-19 10:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38240
[-- Attachment #1.1: Type: text/plain, Size: 252 bytes --]
Here's yet another newer version :)
--
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
[-- Attachment #1.2: 0001-services-sysctl-Make-service-one-shot.patch --]
[-- Type: text/plain, Size: 1072 bytes --]
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))))))
(define sysctl-service-type
(service-type
--
2.24.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
2019-11-19 10:00 ` [bug#38240] [PATCH v3] " Efraim Flashner
@ 2019-11-20 14:10 ` Ludovic Courtès
2019-11-20 19:24 ` bug#38240: " Efraim Flashner
0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-11-20 14:10 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 38240
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’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#38240: [PATCH v3] services: sysctl: Make service one-shot.
2019-11-20 14:10 ` Ludovic Courtès
@ 2019-11-20 19:24 ` Efraim Flashner
0 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2019-11-20 19:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38240-done
[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]
On Wed, Nov 20, 2019 at 03:10:57PM +0100, Ludovic Courtès wrote:
> 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’.
I didn't think that'd be a problem.
>
> Apart from that, it’s all good to me! :-)
>
> Ludo’.
Ok, patch pushed!
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-11-20 19:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-11-20 19:24 ` bug#38240: " Efraim Flashner
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).