mirror of
https://github.com/troglobit/finit.git
synced 2026-11-19 19:40:50 +00:00
Improve documentation for runparts and hook scripts
Issue #315. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
6bbfc7b1f1
commit
a436382886
2 files changed
+16
-6
No files matched your search
+13
-6
@@ -638,9 +638,16 @@ files, or scripts, in the directory are called, in alphabetic order.
|
|||||||
The scripts in this directory are executed at the very end of runlevel
|
The scripts in this directory are executed at the very end of runlevel
|
||||||
`S`, [bootstrap][].
|
`S`, [bootstrap][].
|
||||||
|
|
||||||
It can be beneficial to use `S01name`, `S02othername`, etc. if there
|
It can be beneficial to use `01-name`, `02-othername`, etc., to ensure
|
||||||
is a dependency order between the scripts. Symlinks to existing
|
the scripts are started in that order, e.g., if there is a dependency
|
||||||
daemons can talso be used, but make sure they daemonize by default.
|
order between scripts. Symlinks to existing daemons can talso be used,
|
||||||
|
but make sure they daemonize (background) themselves properly, otherwise
|
||||||
|
Finit will lock up.
|
||||||
|
|
||||||
|
If `S[0-9]foo` and `K[0-9]bar` style naming is used, the executable will
|
||||||
|
be called with an extra argument, `start` and `stop`, respectively.
|
||||||
|
E.g., `S01foo` will be called as `S01foo start`. Of course, `S01foo`
|
||||||
|
and `K01foo` may be a symlink to to `another/directory/foo`.
|
||||||
|
|
||||||
Similar to the `/etc/rc.local` shell script, make sure that all your
|
Similar to the `/etc/rc.local` shell script, make sure that all your
|
||||||
services and programs either terminate or start in the background or
|
services and programs either terminate or start in the background or
|
||||||
@@ -878,9 +885,9 @@ There is, however, nothing preventing you from having all configuration
|
|||||||
settings in `/etc/finit.conf`.
|
settings in `/etc/finit.conf`.
|
||||||
|
|
||||||
> **Note:** The `/etc/finit.d` directory was previously the default
|
> **Note:** The `/etc/finit.d` directory was previously the default
|
||||||
> Finit [runparts](#run-parts-scripts) directory. Finit no
|
> Finit [runparts](#run-parts-scripts) directory. Finit >=v4.0
|
||||||
> longer has a default `runparts`, make sure to update your
|
> no longer has a default `runparts` directory, make sure to
|
||||||
> setup, or the finit configuration, accordingly.
|
> update your setup, or the finit configuration, accordingly.
|
||||||
|
|
||||||
|
|
||||||
Watchdog
|
Watchdog
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ the second is the condition name and hook script path. A hook script is
|
|||||||
a plain shell script, or program, that does a very small dedicated job
|
a plain shell script, or program, that does a very small dedicated job
|
||||||
at the below hook points.
|
at the below hook points.
|
||||||
|
|
||||||
|
See [Run-parts Scripts](config.md#run-parts-scripts) for details on the
|
||||||
|
requirements, and possibilities, of hook scripts.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
$ mkdir -p /libexec/finit/hook/sys/down
|
$ mkdir -p /libexec/finit/hook/sys/down
|
||||||
|
|||||||
Reference in new issue
Block a user