Skip to content

Commit

Permalink
Drop doc/bootstrap.md, inaccurate and confusing to users
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Oct 24, 2023
1 parent d5738da commit eaef302
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 95 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

* [Introduction](#introduction)
* [Features](#features)
* [Bootstrap](doc/bootstrap.md#bootstrap)
* [Runlevels](#runlevels)
* [Syntax](doc/config.md#syntax)
* [Runparts & /etc/rc.local](#runparts--etcrclocal)
Expand Down Expand Up @@ -391,8 +390,7 @@ Right after the runlevel change when all services have started properly,
No configuration stanza in `/etc/finit.conf` is required for `rc.local`.
If it exists and is an executable shell script Finit calls it at the very
end of the boot, before calling the `HOOK_SYSTEM_UP`. See more on hooks
in [doc/plugins.md](doc/plugins.md#hooks), and about the system bootstrap
in [doc/bootstrap.md](doc/bootstrap.md).
in [doc/plugins.md](doc/plugins.md#hooks).


### Limitations
Expand Down
63 changes: 0 additions & 63 deletions doc/bootstrap.md

This file was deleted.

54 changes: 25 additions & 29 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,13 @@ order, and `swapoff` is called.
- ` 0`: shutdown

Runlevels are declared per service/run/task/sysv command. Starting in
runlevel S ([bootStrap](bootstrap.md)), usually only for tasks supposed
to run once at boot, and services like `syslogd`, which you need to
start and run throughout the whole time your system is up. Before `S`
is started, however, Finit performs a lot of housekeeping tasks like
mounting all filesystems, calling `fsck` if needed, and making sure the
everything is OK.
runlevel S (bootStrap), usually only for tasks supposed to run once at
boot, and services like `syslogd`, which you need to start and run
throughout the whole time your system is up.

Before `S` is started, however, Finit performs a lot of housekeeping
tasks like mounting all filesystems, calling `fsck` if needed, and
making sure the everything is OK.

task [S] /lib/console-setup/console-setup.sh
service [S12345] env:-/etc/default/rsyslog rsyslogd -n $RSYSLOGD_ARGS
Expand Down Expand Up @@ -520,7 +521,7 @@ following directives:


> **Note:** not all directives are available in `/etc/finit.d/*.conf`
> and some directives are only available at [bootstrap][], runlevel `S`,
> and some directives are only available at bootstrap, runlevel `S`,
> see [Limitations](#limitations) below for details.

Expand All @@ -533,7 +534,7 @@ the contents of that file is used.

Deprecated. We recommend using `/etc/hostname` instead.

> **Note:** only read and executed in runlevel S ([bootstrap][]).
> **Note:** only read and executed in runlevel S (bootstrap).

### Kernel Modules
Expand All @@ -551,7 +552,7 @@ BusyBox mdev tool, add to `/etc/mdev.conf`:

$MODALIAS=.* root:root 0660 @modprobe -b "$MODALIAS"

> **Note:** only read and executed in runlevel S ([bootstrap][]).
> **Note:** only read and executed in runlevel S (bootstrap).

### Networking
Expand All @@ -564,7 +565,7 @@ Deprecated. We recommend using dedicated task/run stanzas per runlevel,
or `/etc/network/interfaces` if you have a system with `ifupdown`, like
Debian, Ubuntu, Linux Mint, or an embedded BusyBox system.

> **Note:** only read and executed in runlevel S ([bootstrap][]).
> **Note:** only read and executed in runlevel S (bootstrap).

### Alternate finit.d/
Expand Down Expand Up @@ -619,7 +620,7 @@ stanzas can share the same rlimits if they are in the same .conf.

**Syntax:** `runlevel <N>`

The system runlevel to go to after [bootstrap][] (S) has completed. `N`
The system runlevel to go to after bootstrap (S) has completed. `N`
is the runlevel number 0-9, where 6 is reserved for reboot and 0 for
halt.

Expand All @@ -628,7 +629,7 @@ Finit disables networking in this mode.

*Default:* 2

> **Note:** only read and executed in runlevel S ([bootstrap][]).
> **Note:** only read and executed in runlevel S (bootstrap).

### One-shot Commands (sequence)
Expand Down Expand Up @@ -966,9 +967,8 @@ previous stanza can also be written as:
**Syntax:** `runparts [progress] [sysv] <DIR>`

Call [run-parts(8)][] on `DIR` to run start scripts. All executable
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][].
files in the directory are called, in alphabetic order. The scripts in
this directory are executed at the very end of runlevel `S`.

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
Expand All @@ -993,10 +993,9 @@ before continuing. None of them can issue commands to start, stop, or
restart other services. Also, ensure all your services and programs
either terminate or start in the background or you will block Finit.

> **Note:** `runparts` scrips are only read and executed in runlevel S
> ([bootstrap][]). See [hook scripts](plugins.md#hooks) for other ways
> to run scripts at certain points during the complete lifetime of the
> system.
> **Note:** `runparts` scrips are only read and executed in runlevel S.
> See [hook scripts](plugins.md#hooks) for other ways to run scripts at
> certain points during the complete lifetime of the system.
**Recommendations:**

Expand Down Expand Up @@ -1109,8 +1108,8 @@ can be omitted to keep the kernel default.
tty [12345] @console noclear vt220

On really bare bones systems, or for board bringup, Finit can give you a
shell prompt as soon as [bootstrap][] is done, without opening any
device node:
shell prompt as soon as bootstrap is done, without opening any device
node:

tty [12345789] notty

Expand Down Expand Up @@ -1345,12 +1344,11 @@ Watchdog
When built `--with-watchdog` a separate service is built and installed
in `/libexec/finit/watchdogd`. If this exists at runtime, and the WDT
device node exists, Finit will start it and treat it as the elected
watchdog service to delegate its reboot to. See [bootstrap][] for
details. This delegation is to ensure that the system is rebooted by a
hardware watchdog timer -- on many embedded systems this is crucial to
ensure all circuits on the board are properly reset for the next boot,
in effect ensuring the system works the same after both a power-on and
reboot event.
watchdog service to delegate its reboot to. This delegation is to
ensure that the system is rebooted by a hardware watchdog timer -- on
many embedded systems this is crucial to ensure all circuits on the
board are properly reset for the next boot, in effect ensuring the
system works the same after both a power-on and reboot event.

The delegation is performed at the very last steps of system shutdown,
if reboot has been selected and an elected watchdog is known, first a
Expand All @@ -1372,8 +1370,6 @@ device descriptor. If the kernel driver has been built without this,
the only option is to remove `/libexec/finit/watchdogd` or build without
it at configure time.

[bootstrap]: bootstrap.md


keventd
-------
Expand Down

0 comments on commit eaef302

Please sign in to comment.