unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Don't auto-start a service in Shepherd
@ 2018-02-23  9:22 Rutger Helling
  2018-02-24 22:15 ` Chris Marusich
  2018-02-24 22:27 ` Carlo Zancanaro
  0 siblings, 2 replies; 5+ messages in thread
From: Rutger Helling @ 2018-02-23  9:22 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Hello Guix,

Is there a way to prevent auto-starting a service in Shepherd? I find
that if I use "herd disable service" it still automatically starts the
service on a reboot/reconfigure.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: Don't auto-start a service in Shepherd
  2018-02-23  9:22 Don't auto-start a service in Shepherd Rutger Helling
@ 2018-02-24 22:15 ` Chris Marusich
  2018-02-24 22:27 ` Carlo Zancanaro
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Marusich @ 2018-02-24 22:15 UTC (permalink / raw)
  To: Rutger Helling; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Rutger Helling <rhelling@mykolab.com> writes:

> Hello Guix,
>
> Is there a way to prevent auto-starting a service in Shepherd? I find
> that if I use "herd disable service" it still automatically starts the
> service on a reboot/reconfigure.

I do not know of a way, but perhaps somebody else does.  What is your
use case?  I'm curious to know why you want to disable the service, but
not remove it.

For now, you might be able to accomplish what you want by doing this.
Remove the service from your operating system configuration file, run
"guix system reconfigure", and then reboot into the new system
generation.  Once you're done with whatever you're doing, you can
permanently return to the previous system generation by running "guix
system roll-back", followed by a reboot.  Alternatively, you can
re-introduce the service into your operating system configuration file,
and "roll forward" by running "guix system reconfigure" again.

Hope that helps!

-- 
Chris

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

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

* Re: Don't auto-start a service in Shepherd
  2018-02-23  9:22 Don't auto-start a service in Shepherd Rutger Helling
  2018-02-24 22:15 ` Chris Marusich
@ 2018-02-24 22:27 ` Carlo Zancanaro
  2018-02-26 10:42   ` Rutger Helling
  1 sibling, 1 reply; 5+ messages in thread
From: Carlo Zancanaro @ 2018-02-24 22:27 UTC (permalink / raw)
  To: Rutger Helling; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On Fri, Feb 23 2018, Rutger Helling wrote:
> Is there a way to prevent auto-starting a service in Shepherd? I 
> find that if I use "herd disable service" it still automatically 
> starts the service on a reboot/reconfigure.

I've just had a look at gnu/services/shepherd.scm, and it looks 
like system services can set `auto-start?` to #f when creating 
their shepherd-service, but not many expose this. I think openssh 
is the only service to expose it to the system configuration. You 
could try patching the service you want to use to expose the 
option to not automatically start it. Which service are you trying 
to disable?

There's a discussion to be had about whether shepherd should 
remember disabled services across a reboot/reconfigure. I don't 
think it should, because the running services should be considered 
a part of the system specification.

Carlo

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

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

* Re: Don't auto-start a service in Shepherd
  2018-02-24 22:27 ` Carlo Zancanaro
@ 2018-02-26 10:42   ` Rutger Helling
  2018-03-02 13:44     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Rutger Helling @ 2018-02-26 10:42 UTC (permalink / raw)
  To: Carlo Zancanaro; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

Thanks for the replies. My use case is that I don't want to auto-start
SDDM, since I usually start GNOME (Wayland) from the TTY. However there
are certain cases where I want to start GNOME on X11, for which I do
need SDDM.

On systemd you can do "systemctl disable service", so I was wondering if
there was an equivelant command in Shepherd. Removing the
service entirely and reconfiguring every time I want to start SDDM
isn't really what I'm looking for.

I'll have a look at `auto-start?`. I think it would be nice if all
services exposed this option.

On Sun, 25 Feb 2018 09:27:49 +1100
Carlo Zancanaro <carlo@zancanaro.id.au> wrote:

> On Fri, Feb 23 2018, Rutger Helling wrote:
> > Is there a way to prevent auto-starting a service in Shepherd? I 
> > find that if I use "herd disable service" it still automatically 
> > starts the service on a reboot/reconfigure.  
> 
> I've just had a look at gnu/services/shepherd.scm, and it looks 
> like system services can set `auto-start?` to #f when creating 
> their shepherd-service, but not many expose this. I think openssh 
> is the only service to expose it to the system configuration. You 
> could try patching the service you want to use to expose the 
> option to not automatically start it. Which service are you trying 
> to disable?
> 
> There's a discussion to be had about whether shepherd should 
> remember disabled services across a reboot/reconfigure. I don't 
> think it should, because the running services should be considered 
> a part of the system specification.
> 
> Carlo


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: Don't auto-start a service in Shepherd
  2018-02-26 10:42   ` Rutger Helling
@ 2018-03-02 13:44     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2018-03-02 13:44 UTC (permalink / raw)
  To: Rutger Helling; +Cc: Carlo Zancanaro, help-guix

Hello,

Rutger Helling <rhelling@mykolab.com> skribis:

> Thanks for the replies. My use case is that I don't want to auto-start
> SDDM, since I usually start GNOME (Wayland) from the TTY. However there
> are certain cases where I want to start GNOME on X11, for which I do
> need SDDM.
>
> On systemd you can do "systemctl disable service", so I was wondering if
> there was an equivelant command in Shepherd. Removing the
> service entirely and reconfiguring every time I want to start SDDM
> isn't really what I'm looking for.
>
> I'll have a look at `auto-start?`. I think it would be nice if all
> services exposed this option.

Currently the simplest solution is to expose it for services where the
need is widespread.

Longer-term we may want a more generic mechanism like
<https://bugs.gnu.org/27155>.

Thanks,
Ludo’.

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

end of thread, other threads:[~2018-03-02 13:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-23  9:22 Don't auto-start a service in Shepherd Rutger Helling
2018-02-24 22:15 ` Chris Marusich
2018-02-24 22:27 ` Carlo Zancanaro
2018-02-26 10:42   ` Rutger Helling
2018-03-02 13:44     ` Ludovic Courtès

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).