Skip to content

Commit d52182b

Browse files
committed
doc: massive refactor and simplification to migrate to mkdocs
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent a73e02a commit d52182b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2301
-2266
lines changed

README.md

Lines changed: 13 additions & 702 deletions
Large diffs are not rendered by default.

contrib/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ install and try out Finit on various Linux distributions.
66

77
* [Alpine](alpine/)
88
* [Debian](debian/)
9+
* [Void](void/)
910

1011
If you have ideas on how to simplify, extend, or even add new example
1112
configurations for other distributions you are most welcome! :)

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
config.md
1+
index.md

doc/build.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
Building Finit
22
==============
33

4-
* [Introduction](#introduction)
5-
* [Configure](#configure)
6-
* [Example](#example)
7-
* [Running](#running)
8-
* [Debugging](#debugging)
9-
10-
11-
Introduction
12-
------------
13-
144
Finit comes with a traditional configure script to control features and
155
optional plugins to enable. It depends on two external libraries:
166

doc/cmdline.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
2929
system bootstrap.
3030

3131
Very useful for selecting different boot modes, e.g. manufacturing test,
32-
firmware upgrade, or rescue mode.
32+
firmware upgrade, or [rescue mode][rescue].
3333

3434
> [!NOTE]
3535
> `<boot/...>` conditions cannot be cleared with `initctl`!
@@ -39,10 +39,10 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
3939

4040
./configure --with-config=/etc/finit.conf
4141

42-
Useful when starting up in various rescue mode, factory, or
42+
Useful when starting up in various [rescue mode][rescue], factory, or
4343
production test setups. Use the top-level configuration file
44-
directive `rcsd /path/to/finit.d` to override the default
45-
rcS.d directory.
44+
directive `rcsd /path/to/finit.d` to override the default rcS.d
45+
directory.
4646

4747
* `finit.debug[=bool]`: Enable finit debug. This is operated
4848
independently of the kernel `debug` setting. New as of Finit v4.
@@ -75,7 +75,7 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
7575
* `init=/bin/sh`: Bypass system default init and tell kernel to start a
7676
shell. Note, this shell is very limited and does not support
7777
signals and has no job control. Recommend using, and modifying,
78-
`rescue` mode instead.
78+
[`rescue` mode][rescue] instead.
7979

8080
* `loglevel=<0-7>`, sets the kernel's log level, which is more granular
8181
than `debug`. Also, when `loglevel=7`, Finit will *not disable*
@@ -90,12 +90,11 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
9090
* `quiet`: Suppress kernel logging to console, except for warnings and
9191
errors. Also, see `loglevel` and `quiet` above.
9292

93-
* `rescue`: Start rescue/maintenance mode. If your system comes with
94-
the bundled `sulogin` program (Finit, or from util-linux/Busybox),
95-
you will be given a root login to a maintenance shell. However, if
96-
`sulogin` is missing, the file `/lib/finit/rescue.conf` is read and
97-
the system booted in a limited fallback mode. See [config.md][]
98-
for more information.
93+
* `rescue`: Start [rescue/maintenance mode][rescue]. If your system
94+
comes with the bundled `sulogin` program (Finit, or from util-linux,
95+
or Busybox), you will be given a root login to a maintenance shell.
96+
However, if `sulogin` is missing, the file `/lib/finit/rescue.conf`
97+
is read and the system booted in a limited fallback mode.
9998

10099
This option can be disabled with `configure --without-rescue`
101100

@@ -116,5 +115,5 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
116115

117116
For more on kernel boot parameters, see the man page [bootparam(7)][].
118117

119-
[config.md]: config.md#rescue-mode
118+
[rescue]: config/rescue.md
120119
[bootparam(7)]: https://www.man7.org/linux/man-pages/man7/bootparam.7.html

doc/commands.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Rebooting & Halting
2+
===================
3+
4+
Traditionally, rebooting and halting a UNIX system is done by switching
5+
to the corresponding runlevel (0 or 6). Over time this has changed and
6+
Finit comes with its own tooling providing: `shutdown`, `reboot`,
7+
`poweroff`, and `suspend`. These commands are also available from the
8+
[`initctl`](initctl.md) tool.
9+
10+
For compatibility reasons Finit listens to the same set of signals as
11+
BusyBox init. This is not 100% compatible with SysV init, but clearly
12+
the more common combination for Finit. For more details, see the
13+
[Signal](signals.md) section.

doc/conditions.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
Finit Conditions
2-
================
1+
Conditions
2+
==========
33

4-
![The service state machine](svc-machine.png "The service state machine")
5-
6-
* [Introduction](#introduction)
7-
* [Triggering](#triggering)
8-
* [Built-in Conditions](#built-in--conditions)
9-
* [Debugging](#debugging)
10-
* [Internals](#internals)
11-
12-
13-
Introduction
14-
------------
15-
16-
Conditions are a relatively new addition to Finit, introduced in v3,
17-
with the intention of providing a mechanism for common synchronization
18-
problems. For example:
4+
Conditions were added to Finit in v3 with the intention of providing a
5+
mechanism for common synchronization problems. For example:
196

207
- *"wait for service A to start before starting service B"*, or
218
- *"wait for basic network access to be available"*
@@ -89,7 +76,8 @@ User-defined conditions are controlled using the `initctl cond set` and
8976

9077
The purpose of user-defined conditions is to be able to start or stop
9178
services, or run/task jobs, on external site-dependent stimuli.
92-
Example:
79+
80+
**Example:**
9381

9482
service [2345] <usr/foo> alarm --arg foo -- Foo alarm
9583

@@ -277,6 +265,8 @@ A condition is always in one of three states:
277265
All conditions that have not explicitly been set are interpreted as
278266
being in the `off` state.
279267

268+
![The service state machine](svc-machine.png "The service state machine")
269+
280270
When a reconfiguration is requested, Finit transitions all conditions to
281271
the `flux` state. As a result, services that depend on a condition are
282272
sent `SIGSTOP`. Once the new state of the condition is asserted, the

0 commit comments

Comments
 (0)