GNU bug report logs -
#38304
[PATCH]: Make more services one-shot
Previous Next
To reply to this bug, email your comments to 38304 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#38304
; Package
guix-patches
.
(Wed, 20 Nov 2019 19:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 20 Nov 2019 19:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
After changing the sysctl service to use one-shot I found 3 more that
look like they'd be good choices.
--
Efraim Flashner <efraim <at> 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
[0001-services-host-name-Make-service-one-shot.patch (text/plain, attachment)]
[0002-services-console-keymap-service-type-Make-service-on.patch (text/plain, attachment)]
[0003-services-console-font-shepherd-services-Make-service.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#38304
; Package
guix-patches
.
(Wed, 20 Nov 2019 19:55:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 38304 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <efraim <at> 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
>
> From 6c13de1914503afb3533a0fe032b4db767011874 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim <at> 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
>
> From 153d02caa1333788df435ca4ffbf915c50d9cb01 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim <at> 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
>
--
Efraim Flashner <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#38304
; Package
guix-patches
.
(Sun, 08 Dec 2019 21:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 38304 <at> debbugs.gnu.org (full text, mbox):
Hello!
Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 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.
Is it a problem, though? I think they should still get started, even if
‘host-name’ is one-shot, no?
Conceptually, ‘console-keymap’ and ‘console-font’ do not look like
one-shot to me though: it’s not implemented, but their ‘stop’ method
could very much restore the previous keymap/font.
WDYT?
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#38304
; Package
guix-patches
.
(Fri, 13 Dec 2019 20:51:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 38304 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Dec 08, 2019 at 10:28:42PM +0100, Ludovic Courtès wrote:
> Hello!
>
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
>
> > 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.
>
> Is it a problem, though? I think they should still get started, even if
> ‘host-name’ is one-shot, no?
I'll try to test this in the next week or so.
>
> Conceptually, ‘console-keymap’ and ‘console-font’ do not look like
> one-shot to me though: it’s not implemented, but their ‘stop’ method
> could very much restore the previous keymap/font.
>
I feel like since these commands don't have an 'undo' command from the
terminal or from various DEs (that I know of) that making them one-shot
would make more sense.
Also we wouldn't want the keymap or font to change during shutdown when
services get stopped.
--
Efraim Flashner <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#38304
; Package
guix-patches
.
(Sun, 29 Dec 2019 08:07:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 38304 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Dec 13, 2019 at 10:50:11PM +0200, Efraim Flashner wrote:
> On Sun, Dec 08, 2019 at 10:28:42PM +0100, Ludovic Courtès wrote:
> > Hello!
> >
> > Efraim Flashner <efraim <at> flashner.co.il> skribis:
> >
> > > 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.
> >
> > Is it a problem, though? I think they should still get started, even if
> > ‘host-name’ is one-shot, no?
>
> I'll try to test this in the next week or so.
I tested this a bit with some other services I'm working on. When
service A is one-shot and service B depends on it, when service B starts
it also 'runs' service A. So it looks like it won't be a problem
after all.
>
> >
> > Conceptually, ‘console-keymap’ and ‘console-font’ do not look like
> > one-shot to me though: it’s not implemented, but their ‘stop’ method
> > could very much restore the previous keymap/font.
> >
>
> I feel like since these commands don't have an 'undo' command from the
> terminal or from various DEs (that I know of) that making them one-shot
> would make more sense.
>
> Also we wouldn't want the keymap or font to change during shutdown when
> services get stopped.
>
> --
> Efraim Flashner <efraim <at> 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
--
Efraim Flashner <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 5 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.