[systemd-devel] EXT :Re: Deferring start of service until file exists

Reindl Harald h.reindl at thelounge.net
Wed Aug 21 04:37:47 UTC 2019


Am 21.08.19 um 06:34 schrieb Reindl Harald:
> Am 21.08.19 um 06:10 schrieb Mantas Mikulėnas:
>> On Tue, Aug 20, 2019, 20:43 Reindl Harald <h.reindl at thelounge.net
>> <mailto:h.reindl at thelounge.net>> wrote:
>>
>>     Am 20.08.19 um 18:56 schrieb Boyce, Kevin P [US] (AS):
>>     > If this gets figured out, I would love to know how to do it as well.
>>     >
>>     > My experience with systemd is that it will proceed to start other
>>     services once the dependencies have started, not necessarily exited.
>>
>>     no
>>
>>     that's only true for Type=simple or for broken services which are
>>     forking too soon
>>
>>
>> As written it's probably true for all types except Type=oneshot, I think
>> that's what was meant by "exited". (I.e. not "daemonized")
> 
> hell no, oneshot orders too and it's even easier becaue it exists
> completly and it takes you just 30 seconds to try it out or a little
> expierience with systemd at all
> 
> the only thing where systemd can't wait is "simple" because there is no
> forking and no exit and so systemd can't tell if the executeable is full
> opertional
> 
> oneshot: no-brainer, ExecStart exists, next prdered service
> forking: doble fork of ExecStart, next orderred service
> notify:  mainpid even tells systemd "im ready, you can continue"

Type=oneshot
RemainAfterExit=yes

that way the reverse ordering at shutdown even works fine


More information about the systemd-devel mailing list