:: [DNG] s6 in devuan (Was Re: New goo…
Etusivu
Poista viesti
Vastaa
Lähettäjä: aitor
Päiväys:  
Vastaanottaja: dng
Vanhat otsikot: Re: [DNG] New goodies from systemd
Aihe: [DNG] s6 in devuan (Was Re: New goodies from systemd)
Hi,

On 9/8/23 14:10, aitor wrote:
> On 9/8/23 12:30, wirelessduck--- via Dng wrote:
>> So how does it get defined as a oneshot service to run once on
>> startup? I'm guessing running `sv once` is a manual operation.
> I think that the most reasonable way is to invoke `run once <service>`
> within the runit run script of another service that depends on it. For
> example, a service that needs to load the kernel parameters would invoke
> `sv once procps`
>
>> The run scripts themselves do not define what type of service they are?
> No, they don't. The *.service files of systemd do define the type as follows:
> [Service]
> Type=oneshot
> They make a subtle distinction between simple and oneshot though.


s6/s6-rc also does a distinction between "longrun" and "oneshot" (and "bundles") in a file named "type":

https://www.skarnet.org/software/s6-rc/overview.html

Most, if not all the sysvinit scripts symlinked at /etc/rcS.d (those related to mount operations, hwclock,
hostname, urandom, ifupdown, procps, x11-common, etc...) belong to oneshot services, where only start/stop
operations are defined, being restart/reload not supported arguments.

This said, I consider the translation of these scripts into s6 or runit scripts as one of the first steps
to turn a sysvinit system into a -non hybrid- s6 or runit system.

My efforts in this matter consisted on packaging the most recent sources of the s6/s6-rc software [*],
defining a few services and building the database afterwards. The result has been a semi-functional devuan
system including a few services like eudev and dbus supervised by s6, that I didn't test in-depth.

Of course, this is only the first step and there is still a lot of work to do.
But I find s6 quite interesting!

Cheers,

Aitor.

[*] skalibs, execline, s6, s6-rc and s6-linux-init