Re: Question about s6-linux-init

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Tue, 15 Aug 2023 09:33:07 +0000

>While following the guide for the init part I noticed the init scripts seem to be shell scripts. Is there any particular reason they are not execline scripts? I’ve become much more fond of those while trying the waters before.
>Would it be sensible for me to rewrite them in execline? And, similarly, would you be interested in receiving patches if I do?

  Hi Mario,

  execline is best used in very specific situations:
  - when scripts are *very* simple
  - for automatically generated scripts (execline is easier to generate
than shell)
  - for power users

  Scripts such as /etc/rc.init don't fit in these categories. They can
contain a lot of stuff (look at s6-overlay's rc.init for an example of
something generic enough to work in a Docker container), they're meant
to be written manually, and by non-specialists of the s6 ecosystem.
  That makes execline a bad fit.

  I obviously like execline as much as you do, but it has shown to
generally be an obstacle to s6 adoption, because people who are new to
the ecosystem see it, rightly or wrongly, as an additional hurdle.
There's a diehard piece of FUD about s6 that says you *have to* learn
execline in order to use it; it has never been true, but the myth
lingers nonetheless, and showing that you can write scripts in whatever
language you want helps dispel it.

  For this reason, the init script examples are provided in shell, and
will remain so. Of course, you're free to write your own scripts in
execline, and encouraged to do so if you're comfortable with it and
it makes them more efficient :)

--
  Laurent
Received on Tue Aug 15 2023 - 11:33:07 CEST

This archive was generated by hypermail 2.4.0 : Tue Aug 15 2023 - 11:33:37 CEST