mirror of
https://github.com/troglobit/finit.git
synced 2026-12-04 21:58:19 +00:00
README: Reduce indentation of code blocks, use ``` instead
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
0b43d0dc70
commit
46c5e41b68
1 file changed
+12
-2
@@ -49,7 +49,7 @@ the familiar [/etc/rc.local](#runparts--etcrclocal) are started.
|
|||||||
|
|
||||||
**Example /etc/finit.conf:**
|
**Example /etc/finit.conf:**
|
||||||
|
|
||||||
```
|
```conf
|
||||||
# Fallback if /etc/hostname is missing
|
# Fallback if /etc/hostname is missing
|
||||||
host wopr
|
host wopr
|
||||||
|
|
||||||
@@ -150,9 +150,11 @@ Finit also comes with a built-in Getty for Linux console TTYs. It can
|
|||||||
parse `/etc/inittab` and set the speed. Then `/bin/login` handles all
|
parse `/etc/inittab` and set the speed. Then `/bin/login` handles all
|
||||||
nasty bits with PAM etc.
|
nasty bits with PAM etc.
|
||||||
|
|
||||||
|
```conf
|
||||||
# /etc/finit.conf
|
# /etc/finit.conf
|
||||||
tty [12345] /dev/tty1 38400 linux
|
tty [12345] /dev/tty1 38400 linux
|
||||||
tty [12345] /dev/ttyAMA0 115200 vt100
|
tty [12345] /dev/ttyAMA0 115200 vt100
|
||||||
|
```
|
||||||
|
|
||||||
**Runlevels**
|
**Runlevels**
|
||||||
|
|
||||||
@@ -226,7 +228,7 @@ are used, and even more commonly, only the default runlevel is used.
|
|||||||
To specify an allowed set of runlevels for a `service`, `run` command,
|
To specify an allowed set of runlevels for a `service`, `run` command,
|
||||||
`task`, or `tty`, add `[NNN]` to your `/etc/finit.conf`, like this:
|
`task`, or `tty`, add `[NNN]` to your `/etc/finit.conf`, like this:
|
||||||
|
|
||||||
```
|
```conf
|
||||||
service [S12345] /sbin/syslogd -n -x -- System log daemon
|
service [S12345] /sbin/syslogd -n -x -- System log daemon
|
||||||
run [S] /etc/init.d/acpid start -- Starting ACPI Daemon
|
run [S] /etc/init.d/acpid start -- Starting ACPI Daemon
|
||||||
task [S] /etc/init.d/kbd start -- Preparing console
|
task [S] /etc/init.d/kbd start -- Preparing console
|
||||||
@@ -278,6 +280,7 @@ Finit also listens to the classic SysV init FIFO, used by `telinit`.
|
|||||||
Support for this is implemented by the `initctl.so` plugin. Hence,
|
Support for this is implemented by the `initctl.so` plugin. Hence,
|
||||||
`telinit q` will work as the UNIX beards intended.
|
`telinit q` will work as the UNIX beards intended.
|
||||||
|
|
||||||
|
```shell
|
||||||
~ # telinit -h
|
~ # telinit -h
|
||||||
Usage: telinit [OPTIONS] [q | Q | 0-9]
|
Usage: telinit [OPTIONS] [q | Q | 0-9]
|
||||||
|
|
||||||
@@ -293,6 +296,7 @@ Support for this is implemented by the `initctl.so` plugin. Hence,
|
|||||||
q, Q Reload *.conf in /etc/finit.d/, same as initctl reload or
|
q, Q Reload *.conf in /etc/finit.d/, same as initctl reload or
|
||||||
sending SIGHUP to PID 1
|
sending SIGHUP to PID 1
|
||||||
1, s, S Enter system rescue mode, runlevel 1
|
1, s, S Enter system rescue mode, runlevel 1
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Commands & Status
|
Commands & Status
|
||||||
@@ -302,6 +306,7 @@ Finit also implements a more modern API to query status, and start/stop
|
|||||||
services, called `initctl`. Unlike `telinit` the `initctl` tool does
|
services, called `initctl`. Unlike `telinit` the `initctl` tool does
|
||||||
not return until the given command has fully completed.
|
not return until the given command has fully completed.
|
||||||
|
|
||||||
|
```shell
|
||||||
~ $ initctl -h
|
~ $ initctl -h
|
||||||
Usage: initctl [OPTIONS] <COMMAND>
|
Usage: initctl [OPTIONS] <COMMAND>
|
||||||
|
|
||||||
@@ -325,6 +330,7 @@ not return until the given command has fully completed.
|
|||||||
restart <JOB|NAME>[:ID] Restart (stop/start) service by job# or name
|
restart <JOB|NAME>[:ID] Restart (stop/start) service by job# or name
|
||||||
reload <JOB|NAME>[:ID] Reload (SIGHUP) service by job# or name
|
reload <JOB|NAME>[:ID] Reload (SIGHUP) service by job# or name
|
||||||
version Show Finit version
|
version Show Finit version
|
||||||
|
```
|
||||||
|
|
||||||
For services *not* supporting `SIGHUP` the `<!>` notation in the .conf
|
For services *not* supporting `SIGHUP` the `<!>` notation in the .conf
|
||||||
file must be used to tell Finit to stop and start it on `reload` and
|
file must be used to tell Finit to stop and start it on `reload` and
|
||||||
@@ -336,6 +342,7 @@ the current runlevel these services will not be respawned automatically
|
|||||||
by Finit if they exit (crash). Hence, if the runlevel is 2, the below
|
by Finit if they exit (crash). Hence, if the runlevel is 2, the below
|
||||||
Dropbear SSH service will not be restarted if it is killed or exits.
|
Dropbear SSH service will not be restarted if it is killed or exits.
|
||||||
|
|
||||||
|
```shell
|
||||||
~ $ initctl status -v
|
~ $ initctl status -v
|
||||||
1 running 476 [S12345] /sbin/watchdog -T 16 -t 2 -F /dev/watchdog
|
1 running 476 [S12345] /sbin/watchdog -T 16 -t 2 -F /dev/watchdog
|
||||||
2 running 477 [S12345] /sbin/syslogd -n -b 3 -D
|
2 running 477 [S12345] /sbin/syslogd -n -b 3 -D
|
||||||
@@ -347,6 +354,7 @@ Dropbear SSH service will not be restarted if it is killed or exits.
|
|||||||
5:2 inetd 0 [2345] /sbin/telnetd allow eth0:2323,eth2:2323,eth1:2323
|
5:2 inetd 0 [2345] /sbin/telnetd allow eth0:2323,eth2:2323,eth1:2323
|
||||||
6:1 inetd 0 [345] /sbin/dropbear allow eth0:222
|
6:1 inetd 0 [345] /sbin/dropbear allow eth0:222
|
||||||
6:2 inetd 0 [345] /sbin/dropbear allow *:22 deny eth0
|
6:2 inetd 0 [345] /sbin/dropbear allow *:22 deny eth0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@@ -363,7 +371,9 @@ At boot Finit calls either `mdev` or `udevd` to populate `/dev`, this is
|
|||||||
done slightly differently and on systems with udev you might want to add
|
done slightly differently and on systems with udev you might want to add
|
||||||
the following one-shot task early in your `/etc/finit.conf`:
|
the following one-shot task early in your `/etc/finit.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
run [S] /sbin/udevadm settle --timeout=120 -- Waiting for udev
|
run [S] /sbin/udevadm settle --timeout=120 -- Waiting for udev
|
||||||
|
```
|
||||||
|
|
||||||
Finit has a built-in Getty for TTYs, but requires a working `/bin/login`
|
Finit has a built-in Getty for TTYs, but requires a working `/bin/login`
|
||||||
or `/bin/sh`, if no TTYs are configured in `/etc/finit.conf`.
|
or `/bin/sh`, if no TTYs are configured in `/etc/finit.conf`.
|
||||||
|
|||||||
Reference in new issue
Block a user