[systemd-devel] Cannot get Shutdown Script to Run (Libvirt Virtual Machine Shutdown)

"Jóhann B. Guðmundsson" johannbg at gmail.com
Fri Oct 10 01:28:46 PDT 2014


On 10/09/2014 11:35 PM, Zbigniew Jędrzejewski-Szmek wrote:
> On Thu, Oct 09, 2014 at 01:41:24AM +0200, Lennart Poettering wrote:
>> The ExecStart=/bin/true we just add because current systemd versions
>> refuse to run service units that have no ExecStart= set. It is on the
>> TODO list to allow services also when they have no ExecStart= but with
>> an ExecStop=, but this has not been implemented yet.
> Isn't this it:
>
> commit 96fb8242cc1ef6b0e28f6c86a4f57950095dd7f1
> Author: Lennart Poettering <lennart at poettering.net>
> Date:   Thu Aug 21 18:50:42 2014 +0200
>
>      service: allow services of Type=oneshot that specify no ExecStart= commands
>      
>      This is useful for services that simply want to run something on
>      shutdown, but not at bootup. They should only set ExecStop= but leave
>      ExecStart= unset.
>
> Confused,
> Zbyszek

Yeah this was a weird commit and arguably this should be reverted unless 
Lennart explain why we need this in the first place.

Users should be able to install their units into the shutdown target and 
use existing ( After/Before ) ordering and an simply "ExecStart" to 
start unit(s) and have them executed in expected order during the 
shutdown sequence.

If they cannot something bigger is broken and need fixing.

JBG


More information about the systemd-devel mailing list