service B unit configuration (it is an oneshot service):

Description=Service B

service A is disabled by default (it is a simple service)

● serviceA.service - service A
Loaded: loaded (/usr/lib/systemd/system/serviceA.service; disabled; vendor preset: disabled)
Active: inactive (dead)

I would expect service B to not start until service A is started because of the ordering requirement. What I am observing is that service B starts without waiting for service A when machine is booted up. Can anyone explain this

1 Answer 1


If you want to start serviceB.service only if serviceA.service is started (and it's running) then you should add: Requisite to your serviceB.service.

From man systemd.unit:


Similar to Requires=. However, if the units listed here are not started already, they will not be started and the starting of this unit will fail immediately. Requisite= does not imply an ordering dependency, even if both units are started in the same transaction. Hence this setting should usually be combined with After=, to ensure this unit is not started before the other unit.


Description=Service B

ExecStart=/bin/bash /home/user/somescript.sh


So for example, if you don't enable serviceA.service or this one it's not running when the serviceB.service wants to run then you should get a message like this in the serviceB.service logs:

A dependency job for serviceB.service failed. See 'journalctl -xe' for details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .