guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38304] [PATCH]: Make more services one-shot


From: Efraim Flashner
Subject: [bug#38304] [PATCH]: Make more services one-shot
Date: Wed, 20 Nov 2019 21:54:08 +0200
User-agent: Mutt/1.12.2 (2019-09-21)

On Wed, Nov 20, 2019 at 09:45:44PM +0200, Efraim Flashner wrote:
> After changing the sysctl service to use one-shot I found 3 more that
> look like they'd be good choices.
> 

Actually, it looks like agetty and mingetty both rely on the host-name
service, so that one doesn't look like a good choice after all.

> From 64126d7a861a415bf4faafb30687928742db4f2b Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <address@hidden>
> 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
> 

> From 6c13de1914503afb3533a0fe032b4db767011874 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <address@hidden>
> 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
> 

> From 153d02caa1333788df435ca4ffbf915c50d9cb01 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <address@hidden>
> 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
> 




-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]