[systemd-devel] Question on Before=

Steve Dickson SteveD at RedHat.com
Sat Feb 2 21:51:58 UTC 2019



On 2/2/19 3:44 PM, Reindl Harald wrote:
> 
> 
> Am 02.02.19 um 21:05 schrieb Steve Dickson:
>> On 2/2/19 2:52 PM, Reindl Harald wrote:
>>> Am 02.02.19 um 20:42 schrieb Steve Dickson:
>>>> Hello,
>>>>
>>>> In a.service  I have 
>>>>
>>>> [Unit]
>>>> Before=b.service 
>>>>
>>>> [Install]
>>>> RequiredBy=b.service
>>>>
>>>> when I systemd start b.service (which happens to fail) 
>>>> but... a.service is not being run.
>>>>
>>>> So I guess my question is what do I have to do
>>>> to ensure a.service is *always* run before b.service?
>>>
>>>> [Install]
>>>> RequiredBy=b.service
>>>
>>> why?
>>>
>>> [Unit]
>>> Before/After/Require
>>>
>>> [Install]
>>> WantedBy=multi-user.target
>> Because a.service only needs to run when b.service is started. 
> 
> this is a cirrcualr dependency!
> 
> you say "start a before b" and at the same time "start a only when b is
> started"
> 
> hwo do you imagine that to work?
> 
That a would start before b because of the Before= in a.

There was an issue as how I was enabling a... 

thanks for the help!

steved.


More information about the systemd-devel mailing list