Re: s6-rc user services on Gentoo

From: Hoël Bézier <hoelbezier_at_riseup.net>
Date: Mon, 8 Apr 2024 22:22:48 +0200

Hi Alexis, and everyone else,

>i guess i'd probably want OpenRC supervising the user s6-svscan
>process, mainly because, at this point, i'd like to keep using
>OpenRC on my Gentoo system overall: since a lot of my volunteer
>tech work involves providing support to others and
>writing/maintaining documentation, it's useful to keep my own
>system fundamentally similar to what others are running.

I realized I have here just what you need, or at least could use, to do that:
an OpenRC service definition and an execline script which execs into s6-svscan
and sets up s6-rc on top of it.

The execline script is a bit hacky (this loopwhilex should be replaced by a
proper tool waiting for s6-svscan readiness notification), so if anyone wants
to propose enhancements I’m all hears.

The OpenRC script is specifically written for my user, I guess you could make
it generic, I didn’t bother to do so. Feel free to adapt. The
xdg-runtime-dir-bezier-h service referenced in depend() is a service which
makes sure my user has an existing XDG_RUNTIME_DIR at startup (it usually is
created on login, but I want my services to be run during the boot sequence).

Both the execline script and the OpenRC service are based on Laurent’s
s6-svscan OpenRC service for Alpine Linux in which he claims that in the future
s6-svscan will be pid1 in Alpine. ;)

Enjoy,
Hoël

Received on Mon Apr 08 2024 - 22:22:48 CEST

This archive was generated by hypermail 2.4.0 : Mon Apr 08 2024 - 22:23:32 CEST