[systemd-devel] Requires and After

Reindl Harald h.reindl at thelounge.net
Tue Jan 1 12:29:30 UTC 2019



Am 01.01.19 um 12:44 schrieb Jérémy Rosen:
> The short answer is that Requires without after makes little sense,
> since you can't reliably know if your dependency is here without it
> (if it fails at startup, you might or might not be started, depending
> on the startup order systemd chooses)
> 
> however, for backward compatibility reasons, those two will most
> likely stay separate.
> 
> I think a bigger warning in the docs that those two should usually
> be used together would be welcomed.

why?

if it makes little sense than act useful and just make the After
implicit when Requires is in use, it won't harm any "backward
compatibility reasons" which have the After anyways

> On 30/12/2018 12:05, Olaf van der Spek wrote:
>> Evverx suggested I ask here @ https://github.com/systemd/systemd/issues/11284
>> It's about Requires and After. I think a unit in Requires should imply
>> that unit in After too, otherwise the requirement isn't really met.
>> Is there a use case for Requires but not After?
>> If not, would it make sense to change semantics to have Requires imply After?
>>
>> Requires and After are a common source of confusion:
>> https://serverfault.com/questions/812584/in-systemd-whats-the-difference-between-after-and-requires
>> https://unix.stackexchange.com/questions/388586/systemd-requires-vs-wants


More information about the systemd-devel mailing list