Massive update, cleanup of README

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-09-18 16:53:20 +02:00
1 parent 6ce218612b
commit 89105090ed
1 file changed
+36 -27
+36 -27
View File
@@ -38,8 +38,8 @@ Introduction
Finit is an EeePC inspired Fastinit clone with [process supervision][1] Finit is an EeePC inspired Fastinit clone with [process supervision][1]
similar to that of D.J. Bernstein's [daemontools][2] and Gerrit Pape's similar to that of D.J. Bernstein's [daemontools][2] and Gerrit Pape's
[runit][3]. The focus of Finit is on small and embedded Linux systems, [runit][3]. The focus of Finit is on small and embedded Linux systems,
although it is fully usable on server and desktop installations as well. although fully usable on server and desktop installations as well. See
See the [contrib section](contrib/) for Debian and Alpine examples. the [contrib section](contrib/) for Debian and Alpine Linux examples.
Traditional [SysV init][4] style systems are scripted. For low-resource Traditional [SysV init][4] style systems are scripted. For low-resource
embedded systems this is quite resource intensive and often leads to embedded systems this is quite resource intensive and often leads to
@@ -140,26 +140,26 @@ nasty bits with PAM etc.
**Runlevels** **Runlevels**
Runlevels are optional in Finit, but support for [SysV runlevels][5] is Support for SysV init-style [runlevels][5] is available, in the same
available if needed. All services in runlevel S(1) are started first, minimal style as everything else in Finit. The `[2345]` syntax can be
followed by the desired run-time runlevel. Runlevel S can be started in applied to service, task, run, inetd, and TTY stanzas.
sequence by using `run [S] cmd`. Changing runlevels at runtime is done
like any other init, e.g. <kbd>init 4</kbd> All services in runlevel S(1) are started first, followed by the desired
run-time runlevel. Runlevel S can be started in sequence by using `run
[S] cmd`. Changing runlevels at runtime is done like any other init,
e.g. <kbd>init 4</kbd>, but also using the more advanced `intictl` tool.
**Plugins** **Plugins**
Finit plugins can be *callbacks*, *boot hooks* into different stages of Plugins can be used to *extend* the functionality of Finit, *hook into*
the boot process, or *pure extensions*. Plugins are written in C and different stages of the boot process and at runtime, and act as *pure
compiled into a dynamic library that is loaded automatically by finit at extensions*. Plugins are written in C and compiled into a dynamic
boot. A basic set of plugins that extend and modify the basic behavior library that is loaded automatically by finit at boot. A basic set of
are bundled in the `plugins/` directory. plugins are bundled in the `plugins/` directory.
Capabilities: Capabilities:
- **Task/Run/Service callbacks**
Modify service arguments, override service monitor's decisions to
start/stop/reload a service.
- **Hooks** - **Hooks**
Hook into the boot at predefined points to extend Finit Hook into the boot at predefined points to extend Finit
- **I/O** - **I/O**
@@ -178,7 +178,7 @@ For more information, see [doc/plugins.md](doc/plugins.md).
Runparts & /etc/rc.local Runparts & /etc/rc.local
------------------------ ------------------------
At the end of the boot, when networking and all services are up, finit At the end of the boot, when networking and all services are up, Finit
calls its built-in [run-parts(8)][] on the `runparts <DIR>` directory, calls its built-in [run-parts(8)][] on the `runparts <DIR>` directory,
and `/etc/rc.local`, in that order if they exist. and `/etc/rc.local`, in that order if they exist.
@@ -280,24 +280,29 @@ the following signals have been adopted:
Finit currently forwards this to `SIGUSR2`. Finit currently forwards this to `SIGUSR2`.
Finit also listens to the classic SysV init FIFO, which used to be Finit also listens to the classic SysV init FIFO, which used to be
located in `/dev` but these days default to `/run/initctl`. So existing located in `/dev` but these days default to `/run/initctl`. Hence,
tools like, `poweroff`, `halt`, `reboot`, and `shutdown` work as existing tools like, `poweroff`, `halt`, `reboot`, and `shutdown` work
expected. Support for this old-style handling is implemented in the as expected. Support for this old-style handling is implemented in the
optional `initctl.so` plugin and can be accessed with the traditional optional `initctl.so` plugin and can be accessed with the traditional
`telinit` command line tool, symlinked to `finit`. Hence, if finit is `telinit` command line tool, symlinked to `finit`. Hence, if finit is
your system init, then `init q` will work as the UNIX beards intended. your system init, then `init q` will work as the UNIX beards intended.
```shell ```shell
~ $ telinit ~ # telinit -h
Usage: telinit [OPTIONS] [q | Q | 0-9] Usage: telinit [OPTIONS] [q | Q | 0-9]
Options: Options:
-h, --help This help text -h, --help This help text
-v, --version Show Finit version -V, --version Show Finit version
Commands: Commands:
q | Q Reload *.conf in /etc/finit.d/, like SIGHUP 0 Power-off the system, same as initctl poweroff
0 - 9 Change runlevel: 0 halt, 6 reboot 6 Reboot the system, same as initctl reboot
2, 3, 4, 5 Change runlevel. Starts services in new runlevel, stops any
services in prev. runlevel that are not allowed in new.
q, Q Reload *.conf in /etc/finit.d/, same as initctl reload or
sending SIGHUP to PID 1
1, s, S Enter system rescue mode, runlevel 1
``` ```
@@ -385,13 +390,17 @@ Debugging
--------- ---------
Add `finit_debug`, or `--debug`, to the kernel command line to enable Add `finit_debug`, or `--debug`, to the kernel command line to enable
debug messages. See the output from `configure --help` for more on debug messages.
how to assist debugging.
```shell ```shell
init=/sbin/finit --debug append="init=/sbin/finit --debug"
``` ```
To debug startup issues, in particular issues with getty/login, try
`configure --enable-fallback-shell`. When no TTYs are detected, and
Finit is configured with this option, Finit will try to start a bare
`/bin/sh` on the boot console.
Origin & References Origin & References
------------------- -------------------