2021-04-10 00:07:12 UTC
When I built a package using this field, however, I got a message saying that this option is obsolete, which led me to this mailing list message: https://lists.freedesktop.org/archives/systemd-devel/2015-November/034880.html
So my question is, what would be the alternative to using RequiresOverridable? What got our attention to use this flag was that user input would be able to override the requirement, which is exactly what we want. Does Requires= also provide that capability? From our testing it _seems_ like it does but I donât see it called out in the documentation anywhere.
If it helps, I can describe our use-case below:
1.Â Â Â Â Â Â We have a service that executes user-defined bash scripts on system startup called (simplifying) cloud-final.service.
2.Â Â Â Â Â Â We have a service called ecs.service that runs the ecs daemon service. This serviceâs configuration file is usually made by the user scripts run in cloud-final.service
3.Â Â Â Â Â Â So we wanted to make sure ecs.service starts after cloud-final.service. To accomplish this we put After=cloud-final.service in ecs.service.
4.Â Â Â Â Â Â But now we would also like users to be able to override ecs.service waiting for cloud-final.service to finish. Because cloud-final allows users to execute arbitrary bash scripts they should be able to run âsystemctl start ecsâ and the ecs service will start.
5.Â Â Â Â Â Â So the solution we were going to do was split ecs into two services:
a.Â Â Â Â Â Â ecs-ready.service which has After=cloud-final.service
b.Â Â Â Â Â Â ecs.service which has RequiresOverridable=ecs-ready.service
6.Â Â Â Â Â Â The idea above being that normally ecs.service would start with ecs-ready (and thus after cloud-final), but if the user explicitly requested it could be started without having to wait for after cloud-final.