Re: [systemd-devel] Antw: Re: Antw: [EXT] Re: Q: Change a kernel setting

2022-07-29 Thread Thomas HUMMEL




On 29/07/2022 12:34, Ulrich Windl wrote:

Hello, thanks for your answer


Did you try ConditionPathExists= in the Unit?


No but wouldn't the non existence of the file make the job start to fail 
? Besides, (see in my post) the error message the service logged was a 
permission denied.


I agree though that tmpfiles seems to be the most elegant way in general 
to perform such things.


Thanks.

--
Thomas HUMMEL


[systemd-devel] Antw: Re: Antw: [EXT] Re: Q: Change a kernel setting

2022-07-29 Thread Ulrich Windl
>>> Thomas HUMMEL  schrieb am 29.07.2022 um 12:13 in
Nachricht <1a6092bd-e540-1642-87a4-811ca9413...@pasteur.fr>:

> 
> On 29/07/2022 11:41, Ulrich Windl wrote:
> 
>>>You can use tmpfiles. In the manpage
> 
> Hello, well it seems to depend on the subsystem. I tried the tmpfiles 
> way but still encountered some unexplained race condition as explained here
> 
> https://lists.freedesktop.org/archives/systemd-devel/2022-July/048100.html 
> 
> So I rolled back to a service unit and even so I did have to order it 
> After= a late (custom) target

Did you try ConditionPathExists= in the Unit?

> 
> None of this was satisfactory but I did not manage to find out what 
> happened.
> 
> Thanks
> 
> --
> Thomas HUMMEL