On 18/03/2021 18:36, Grant Taylor wrote:
Do services started in the "boot" runlevel continue to run in the "default" runlevel?

Yes

Or do they get stopped as part of transitioning from the "boot" runlevel to the "default" runlevel?  (Or any other runlevel that doesn't include the service.

Generally yes, when changing from one runlevel to another OpenRC will stop all services from the previous (current) runlevel and start the services for the next (new) runlevel.

However, my understanding is that the `boot' and `sysinit' runlevels are "special" and services started there are also included in all "non-special" runlevels.

In your case, `myService-boot' should remain active in `default' along with `myService-default'. You can double check that by running

     $ rc-status


I'm wondering about having two things that are very similar (as in use the same ports), but distinctly different (different configurations) with the following:

...
My expectation is that OpenRC will (try to) start myService-default when the system enters the default runlevel.  But it will fail if myService-boot is still running.

It's difficult to say without understanding what they do and their end goal. It also depends on how the services are coded. If they try to bind to the same port then yes, chances are that `myService-default' will fail at this point as the former would still be running.

If that's the case, one option is to separate their responsibilities and/or make `myService-default' depend on `myService-boot' and have it leverage whatever it is that `myService-boot' already provides.

- V



Reply via email to