Why can't ExecStopPre= be used to abort stopping a (broken) service?

Lennart Poettering mzerqung at 0pointer.de
Tue Jul 16 19:47:39 UTC 2013


On Tue, 16.07.13 21:10, Miroslav Lichvar (mlichvar at redhat.com) wrote:

> On Mon, Jul 15, 2013 at 10:55:59PM +0200, Lennart Poettering wrote:
> > If I grok correctly what you are asking for, you are actually looing for
> > an ExecRestartPre=, not an ExecStopPre=. You want somthing that is run
> > before we stop a service when we intend to restart it. But when we
> > shutdown the system and stop the service for that, or if the user wants
> > to stop it manually, we shouldn't run it, correct?
> > 
> > If that's what you want, then yes, it is on the TODO list to add
> > something like this, but ExecStopPre= is not what you want, it would
> > have very different semantics.
> 
> Possibly related question: Is there a way to start a daemon with
> different options on restart than on start, something like
> ExecRestart?

No. And I am not convinced that that's a good idea to have.

> This would allow restarting chronyd with the -r option to load old
> samples and speed up the initial synchronization.

Hmm, this sounds like something to maybe just solve based on a simple
time scheme? i.e. reuse if the old samples are not older than 1h or so?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list