Re: Understanding s6-rc oneshots

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Mon, 07 Apr 2025 12:38:02 +0000

>s6-envdir: fatal: unable to envdir env: No such file or directory
>s6-rc: warning: unable to start service local-ip: command exited 111
>
>It appears that s6-rc doesn’t like the relative path to `env` directory in the `up` script?

  Yes.
  The env/ and data/ subdirectories are only valid for longruns. When you
write oneshots, you cannot add random data to the source definition
directory - it won't get compiled into the database.

  This is on purpose. The intended way of using oneshots is for you to
decide your own place to store data, and use absolute paths in your
up/down scripts.
  Try storing your environment in /etc/s6-rc/env/local-ip for instance.

  I realize this is confusing (and could probably be better documented,
I will try to make it clearer); but it is a design decision in s6-rc to
enforce as little policy as possible.

  I am (finally!) working on s6-frontend, the higher level interface;
when it's complete it will provide you with a place to store global
data.
So you won't be burdened with the hardships of choice, and free will,
for
much longer.

--
  Laurent
Received on Mon Apr 07 2025 - 14:38:02 CEST

This archive was generated by hypermail 2.4.0 : Mon Apr 07 2025 - 14:38:35 CEST