[systemd-devel] [RFC PATCH] service: add FailureAction= option

Lennart Poettering lennart at poettering.net
Fri Apr 11 07:07:46 PDT 2014


On Fri, 11.04.14 09:48, Michael Olbrich (m.olbrich at pengutronix.de) wrote:

> > > +        else if (allow_restart &&
> > 
> > I would drop the "else" here, I think. Is there a reason not to do the
> > restart thing anyway? If it is configured, it should run I think, just
> > in case the failure action doesn't work or so...
> 
> Are you sure? With Restart=always and FailureAction=reboot this would
> try to start the unit while shutting down. Will the Conflicts= from the
> default dependencies handle this correctly?

It should handle this correctly, and if it doesn't we should fix this. I
mean, my thinking here is that combining FailureAction= and
Restart=failure might not make much sense but there isn't really a
strong reason to totally prohibit it...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list