0

I want a service before systemd runs fstab and generates *.mount files to use, and some services that autostart on bootup that require that specific service to complete. Is there a way to have systemd wait for that service to finish before running a new service?

3

You could have a service B require a service A (e.g. by putting RequiredBy=serviceB.service in the [Install] section of service A), where service A is a Type=oneshot service.

In this case systemd will wait for the main process of service A (specified by ExecStart= in service A unit file) to complete before it starts service B.

(Not sure though if I understand correctly the first part of your question. Maybe this isn't what you were asking)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.