[systemd-devel] Support for pre-restart check

Reindl Harald h.reindl at thelounge.net
Wed Jul 30 05:02:34 PDT 2014


Am 30.07.2014 13:42, schrieb Ansgar Burchardt:
> On 07/30/2014 13:26, "Jóhann B. Guðmundsson" wrote:
>> On 07/30/2014 10:22 AM, Ansgar Burchardt wrote:
>>> Add an ExecRestartPre option in the [Service] section. These commands
>>> are executed when a restart is requested, before the service is stopped.
>>> If they fail, the restart is aborted with an error.
>>>
>> This has been discussed before and check the archive for that discussion
>> but the bottom line is that this is not needed we already have
>> ExecStartPre=, ExecStartPost=, ExecStop=, ExecStopPost=, or ExecReload=
>> which cover those usecases
> 
> I searched for such discussion, but did not find anything relevant. Do
> you have a link?
> 
> And how would you use the existing Exec* options to cover this usecase?
> ExecStart* certainly doesn't help, ExecReload only works for reload and
> not for restart.  ExecStop is to actually stop the service (and should
> not fail due to invalid configuration); ExecStopPost is too late

they don't

"ExecStopPost" is too late, the service is stopped
"ExecReload" is a different game
"ExecStartPre" don't help to prevent the stop

hardly any of the existing options is able to *prevent stop*
and ignore the "systemctl restart" - that would be the semnatic
of a non existing "ExecStopPre"

Pre != Post

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140730/d990fc82/attachment.sig>


More information about the systemd-devel mailing list