From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Alexis Newsgroups: comp.lang.ada Subject: Re: systemd controversy Date: Thu, 21 Mar 2024 11:06:11 +1100 Organization: A noiseless patient Spider Message-ID: <87msqs78jw.fsf@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: dont-email.me; posting-host="6c4a202714ef2e6185060bf328ca1025"; logging-data="1894401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uPimWLSP8Cu6ZA6JFxUGjQqCWo/T6nP4=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:32H3RYiZ+R81Y+xTxtEoFtOGJvw= sha1:Hfk4Xy9dLddmk1p4lQaPLXoSYDs= Xref: news.eternal-september.org comp.lang.ada:66150 List-Id: Lawrence D'Oliveiro writes: > systemd service definitions let you state dependencies between services. > Furthermore, it separates them into ordering dependencies versus > requirement dependencies. > > E.g. an application that uses a MariaDB database requires MariaDB to be > running before it can be started (ordering + requirement dependency). > > An application that can (but doesn’t have to) make use of network services > should be started after the network stack is up (ordering dependency). > > I’m not aware of any other service-management system that provides this > level of control. s6 supports both dependency management and readiness notification: https://skarnet.org/software/s6/overview.html s6 is the basis for 66, used for service management by Obarun, an Arch-based distro: https://wiki.obarun.org/doku.php?id=66intro When i was running Void as my daily driver, i was using 66 for service management. (And not runit, which doesn't have true support for dependencies; kludges are required.) The s6 site has a page discussing "socket activation": https://skarnet.org/software/s6/socket-activation.html OpenRC supports integration with s6, and OpenRC itself provides dependency management; cf. this excerpt from the openrc-run(8) man page: > You should define a depend function for the service so that openrc-run > will start and stop it in the right order in relation to other > services. As it's a function it can be very flexible, see the example > below. Here is a list of the functions you can use in a depend > function. You simply pass the names of the services you want to add to > that dependency type to the function, or prefix the names with ! to > remove them from the dependencies. > > need > The service will attempt to start any services it needs regardless of > whether they have been added to the runlevel. It will refuse to start > until all services it needs have started, and it will refuse to stop > until all services that need it have stopped. > > use > The service will attempt to start any services it uses that have been > added to the runlevel. > > want > The service will attempt to start any services it wants, regardless of > whether they have been added to the runlevel. > > after > The service will start after these services and stop before these services. > > before > The service will start before these services and stop > after these services. > > provide > The service provides this virtual service. For example, named provides > dns. Note that it is not legal to have a virtual and real service > with the same name. If you do this, you will receive an error message, > and you must rename either the real or virtual service. There's also dinit, which i don't have any direct experience of; here's a page by the author, comparing it to other systems: https://github.com/davmac314/dinit/blob/master/doc/COMPARISON (And of course, since cgroups is distinct from systemd, it can be utilised by any init / supervision / service management system.) Alexis.