From 611773a0946f9b1d1b834953236a96cbdfea2211 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 3 Dec 2021 05:32:58 +0000 Subject: Prepare for 0.5.3.0, add contents.d and dependencies.d support Signed-off-by: Laurent Bercot --- doc/s6-rc-compile.html | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'doc/s6-rc-compile.html') diff --git a/doc/s6-rc-compile.html b/doc/s6-rc-compile.html index c00ced8..acaf3c6 100644 --- a/doc/s6-rc-compile.html +++ b/doc/s6-rc-compile.html @@ -115,15 +115,23 @@ contents, i.e. all the services it represents will be marked as essential.

For bundles

- It is possible to use bundle names in a contents file. + It is possible to use bundle names in a contents.d directory or a +contents file. However, if s6-rc-compile detects a cycle in bundle definitions, it will complain and exit 1.

@@ -143,22 +151,27 @@ must contain an integer, which is the maximum number of milliseconds stop; if stopping the service takes longer than this value, s6-rc will declare the transition a failure. If the file does not exist, or contains 0, no timeout is defined and s6-rc will wait indefinitely for the service to stop. -
  • An optional regular file named dependencies. This file must be a list +
  • An optional directory named dependencies.d. This directory must contain +files, no matter their type, no matter their contents, named after services. +(Typically, empty regular files are used.) All the services named in this directory +will be direct dependencies of service, i.e. the services that must +be up in order for service to work properly.
  • +
  • If dependencies.d does not exist: an optional regular file named +dependencies. This file must be a list of service names, one per line. Whitespace at the beginning of a line is ignored, but trailing whitespace is not. Lines starting with a # character are ignored. The file defines the direct dependencies of -service, i.e. the services that must be up in order for -service to work properly.
  • +service. Note that this format is deprecated.

    It is unnecessary to manually define complete sets of dependencies in the -dependencies file, because +dependencies.d directory or the dependencies file, because s6-rc will properly handle dependency chains. If A depends on B, no matter the underlying implementation of B, and the current implementation of B depends on C, then you should just put B in -A/dependencies; when starting the set, +A/dependencies.d; when starting the set, s6-rc will start C first, then B, then A. If the underlying implementation of B changes and does not depend on C, then you will just have to @@ -168,7 +181,7 @@ will still be correct.

    Of course, if A depends on C anyway, you should add -both B and C to A/dependencies. +both B and C to A/dependencies.d.

    -- cgit v1.2.3