From e8170e121627414589ab7a014d373eef55f33d46 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 4 May 2023 10:05:40 +0200 Subject: [PATCH] doc: add use-case for runparts scripts Signed-off-by: Joachim Wiberg --- doc/config.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/config.md b/doc/config.md index 311b92a3..1e6b2236 100644 --- a/doc/config.md +++ b/doc/config.md @@ -823,6 +823,11 @@ files, or scripts, in the directory are called, in alphabetic order. The scripts in this directory are executed at the very end of runlevel `S`, [bootstrap][]. +A common use-case for runparts scripts is to create and enable/disable +services, which Finit will then apply when changing runlevel from S to +whatever the next runlevel is set to be (default 2). E.g., generate a +`/etc/chrony.conf` and `initctl enable chronyd`. + **Limitations:** Scripts called from `runparts`, or hook scripts (see below), are limited @@ -837,7 +842,7 @@ in what they can do and expect from Finit: available; `ls`, `enable`, `disable`, `touch`, `create`, `delete`, and all the `cond` commands. Because all these are basically just wrappers for manipulating files (again, write access for early/late - hooks may not be available.) + hooks may not be available). Also, similar to the `/etc/rc.local` shell script, make sure that all your services and programs either terminate or start in the background