all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#38304] [PATCH]: Make more services one-shot
@ 2019-11-20 19:45 Efraim Flashner
  2019-11-20 19:54 ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2019-11-20 19:45 UTC (permalink / raw)
  To: 38304


[-- Attachment #1.1: Type: text/plain, Size: 321 bytes --]

After changing the sysctl service to use one-shot I found 3 more that
look like they'd be good choices.


-- 
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-host-name-Make-service-one-shot.patch --]
[-- Type: text/plain, Size: 957 bytes --]

From 64126d7a861a415bf4faafb30687928742db4f2b Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Wed, 20 Nov 2019 21:36:56 +0200
Subject: [PATCH 1/3] services: host-name: Make service one-shot.

* gnu/services/base.scm (host-name-service-type): Remove 'respawn?'
keyword from shepherd-service-type, add 'one-shot?'.
---
 gnu/services/base.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b1eff89ecc..7cd42bb30a 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -705,7 +705,7 @@ to add @var{device} to the kernel's entropy pool.  The service will fail if
       (provision '(host-name))
       (start #~(lambda _
                  (sethostname #$name)))
-      (respawn? #f)))))
+      (one-shot? #t)))))
 
 (define (host-name-service name)
   "Return a service that sets the host name to @var{name}."
-- 
2.24.0


[-- Attachment #1.3: 0002-services-console-keymap-service-type-Make-service-on.patch --]
[-- Type: text/plain, Size: 995 bytes --]

From 6c13de1914503afb3533a0fe032b4db767011874 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Wed, 20 Nov 2019 21:38:18 +0200
Subject: [PATCH 2/3] services: console-keymap-service-type: Make service
 one-shot.

* gnu/services/base.scm (console-keymap-service-type): Remove 'respawn?'
keyword from shepherd-service-type, add 'one-shot?'.
---
 gnu/services/base.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 7cd42bb30a..022bb501ba 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -746,7 +746,7 @@ to add @var{device} to the kernel's entropy pool.  The service will fail if
       (start #~(lambda _
                  (zero? (system* #$(file-append kbd "/bin/loadkeys")
                                  #$@files))))
-      (respawn? #f)))))
+      (one-shot? #t)))))
 
 (define-deprecated (console-keymap-service #:rest files)
   #f
-- 
2.24.0


[-- Attachment #1.4: 0003-services-console-font-shepherd-services-Make-service.patch --]
[-- Type: text/plain, Size: 1054 bytes --]

From 153d02caa1333788df435ca4ffbf915c50d9cb01 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Wed, 20 Nov 2019 21:40:50 +0200
Subject: [PATCH 3/3] services: console-font-shepherd-services: Make service
 one-shot.

* gnu/services/base.scm (console-font-shepherd-services): Remove 'stop'
and 'respawn?' keywords from shepherd-service-type, add 'one-shot?'.
---
 gnu/services/base.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 022bb501ba..cef2d4cb2b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -797,8 +797,7 @@ to add @var{device} to the kernel's entropy pool.  The service will fail if
                                         "-C" #$device #$font))
                           ((0 71) #t)
                           (else #f))))
-             (stop #~(const #t))
-             (respawn? #f)))))
+             (one-shot? #t)))))
        tty+font))
 
 (define console-font-service-type
-- 
2.24.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-29  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-20 19:45 [bug#38304] [PATCH]: Make more services one-shot Efraim Flashner
2019-11-20 19:54 ` Efraim Flashner
2019-12-08 21:28   ` Ludovic Courtès
2019-12-13 20:50     ` Efraim Flashner
2019-12-29  8:06       ` Efraim Flashner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.