Skip to content

Commit 994e51e

Browse files
committed
Convert **Note:** et al to GitHub Markdown alerts
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 0a7814b commit 994e51e

File tree

11 files changed

+180
-131
lines changed

11 files changed

+180
-131
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ the maintainer(s) and make it easier for them to include your code.
2424
Coding Style
2525
------------
2626

27-
> **Tip:** Always submit code that follows the style of surrounding code!
27+
> [!TIP]
28+
> Always submit code that follows the style of surrounding code!
2829
2930
First of all, lines are allowed to be longer than 72 characters these
3031
days. In fact, there exist no enforced maximum, but keeping it around

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@ distributions:
6161
* [Alpine Linux](contrib/alpine/), and
6262
* [Debian GNU/Linux](contrib/debian/), also works on Ubuntu/Linux Mint
6363

64-
> **Note:** support for various Linux distributions does not mean Finit
65-
> installs easily on all architectures. The bundled install scripts are
66-
> examples for standard installations, tested on amd64 (x86_64) systems.
67-
> Custom setups, e.g., for embedded systems, can be found in any of the
68-
> following [Buildroot][] based examples: [myLinux][], [Infix][], or the
69-
> plain [br2-finit-demo](https://github.com/troglobit/br2-finit-demo).
64+
> [!NOTE]
65+
> Support for various Linux distributions does not mean Finit installs
66+
> easily on all architectures. The bundled install scripts are examples
67+
> for standard installations, tested on amd64 (x86_64) systems. Custom
68+
> setups, e.g., for embedded systems, can be found in the following
69+
> [Buildroot][] based examples: [myLinux][], [Infix][], or the plain
70+
> [br2-finit-demo](https://github.com/troglobit/br2-finit-demo).
7071
7172

7273
Example
@@ -78,9 +79,10 @@ be placed in `/etc/finit.d/available` and enabled by an operator using
7879
the [initctl](#commands--status) tool. See the above mentioned Linux
7980
distributions, or [myLinux][].
8081

81-
> **Note:** as of Finit v4.4, .conf lines can be broken up using the
82-
> standard UNIX continuation character (`\`), also trailing comments are
83-
> now supported. The latter means you need to escape any hashes used in
82+
> [!TIP]
83+
> As of Finit v4.4, `.conf` lines can be broken up using the standard
84+
> UNIX continuation character (`\`), trailing comments are now also
85+
> supported. The latter means you need to escape any hashes used in
8486
> directives and descriptions (`\#`). For more on this and examples,
8587
> see the [finit.conf(5)][] manual or [doc/config.md](doc/config.md).
8688
@@ -285,6 +287,7 @@ run [S] /path/to/ident --
285287
task [2] <hw/model/foo> /path/to/foo-init -- Initializing Foo board
286288
```
287289

290+
> [!TIP]
288291
> Notice the trick with an empty description to hide the call to `ident`
289292
> in the Finit progress output.
290293
@@ -367,9 +370,10 @@ The `initctl` tool has three commands to help debug and optimize the
367370
setup and monitoring of cgroups. See the `ps`, `top`, and `cgroup`
368371
commands for details.
369372

370-
> **Note:** systems that do not support cgroups, specifically version 2,
371-
> are automatically detected. On such systems the above functionality
372-
> is disabled early at boot.
373+
> [!NOTE]
374+
> Systems that do not support cgroups, specifically version 2, are
375+
> automatically detected. On such systems the above functionality is
376+
> disabled early at boot.
373377
374378

375379
Runparts & /etc/rc.local
@@ -573,9 +577,10 @@ file must be used to tell Finit to stop and start it on `reload` and
573577
`runlevel` changes. If `<>` holds more [conditions](doc/conditions.md),
574578
these will also affect how a service is maintained.
575579

576-
> **Note:** even though it is possible to start services not belonging in
577-
> the current runlevel these services will not be respawned automatically
578-
> by Finit if they exit (crash). Hence, if the runlevel is 2, the below
580+
> [!NOTE]
581+
> Even though it is possible to start services not belonging in the
582+
> current runlevel these services will not be respawned automatically by
583+
> Finit if they exit (crash). Hence, if the runlevel is 2, the below
579584
> Dropbear SSH service will not be restarted if it is killed or exits.
580585
581586
The `status` command is the default, it displays a quick overview of all

contrib/alpine/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
HowTo: Finit on Alpine Linux 3.4...3.19
22
=======================================
33

4-
> **Blog** https://troglobit.com/post/2021-02-12-alpine-linux-with-finit/
4+
> [!TIP]
5+
> https://troglobit.com/post/2021-02-12-alpine-linux-with-finit/
56
67
HowTo use Finit to boot an [Alpine Linux][] system. It is assumed that
78
the user has already installed make, a compiler, C library header files,

contrib/debian/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ tools pre-systemd work as intended.
2020

2121
root@debian:~# apt install initscripts console-setup
2222

23-
> **Note:** as of Debian 11 (Bullseye), libuev and libite are part of
24-
> the main section of Debian. So just install the -dev packages :)
23+
> [!TIP]
24+
> As of Debian 11 (Bullseye), libuev and libite are part of the main
25+
> section of Debian. So just install the -dev packages :)
2526
2627
The following script can then be used to configure, build, install and
2728
set up your system to run Finit:
@@ -47,7 +48,8 @@ comands to `initctl`, followed by `reload` to activate your changes.
4748
You can also use a standard [/etc/rc.local](rc.local) for one-shot tasks
4849
and initialization like keyboard language etc.
4950

50-
> **NOTE:** X Window system, you may need to `sudo apt install elogind`
51+
> [!NOTE]
52+
> For the X Window system, you may need to `sudo apt install elogind`
5153
> (Bullseye and later), followed by `initctl reload` to activate it (it
5254
> is enabled by default), and logout/login again. The elogind daemon
5355
> ensures a regular non-root user can start and interact with an X

doc/build.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Building
2-
========
1+
Building Finit
2+
==============
33

44
* [Introduction](#introduction)
55
* [Configure](#configure)
@@ -17,14 +17,15 @@ optional plugins to enable. It depends on two external libraries:
1717
- [libuEv][], the event loop
1818
- [libite][] (-lite), much needed frog DNA
1919

20-
**NOTE:** Most free/open source software that uses `configure` default
21-
to install to `/usr/local`. However, some Linux distributions do no
22-
longer search that path for installed software, e.g. Fedora and Alpine
23-
Linux. To get finit's configure script to find its dependencies you
24-
have to help the `pkg-config` tool a bit if you do not change the
25-
default prefix path:
26-
27-
PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure
20+
> [!IMPORTANT]
21+
> Most free/open source software packages that use `configure` default
22+
> to install to `/usr/local`. However, some Linux distributions do no
23+
> longer search that path for installed software, e.g. Fedora and Alpine
24+
> Linux. To get finit's configure script to find its dependencies you
25+
> have to help the `pkg-config` tool a bit if you do not change the
26+
> default prefix path:
27+
>
28+
> PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure
2829
2930
The configure script checks for all dependencies, including the correct
3031
version of the above mentioned libraries. Currently required versions:
@@ -71,12 +72,13 @@ Below are a few of the main switches to configure:
7172

7273
For more configure flags, see <kbd>./configure --help</kbd>
7374

74-
> **Note:** the configure script is not available in the GIT sources. It is
75-
> however included in (officially supported) released tarballs. The
76-
> idea is that you should not need GNU autotools to build, only the
77-
> above mentioned dependencies, a POSIX shell, a C compiler and make.
78-
> Any contributing to Finit can generate it from `configure.ac` using
79-
> the `autogen.sh` script.
75+
> [!NOTE]
76+
> The configure script is not available in the GIT sources. It is
77+
> however included in (officially supported) released tarballs. The
78+
> idea is that you should not need GNU autotools to build, only the
79+
> above mentioned dependencies, a POSIX shell, a C compiler and make.
80+
> Any contributing to Finit can generate it from `configure.ac` using
81+
> the `autogen.sh` script.
8082
8183

8284
Example
@@ -115,10 +117,11 @@ Linux config to:
115117

116118
CONFIG_UEVENT_HELPER_PATH="/sbin/mdev"
117119

118-
**Note:** If you run into problems starting Finit, take a look at
119-
`finit.c`. One of the most common problems is a custom Linux kernel
120-
build that lack `CONFIG_DEVTMPFS`. Another is too much cruft in the
121-
system `/etc/fstab`.
120+
> [!TIP]
121+
> If you run into problems starting Finit, take a look at `finit.c`.
122+
> One of the most common problems is a custom Linux kernel build that
123+
> lack `CONFIG_DEVTMPFS`. Another is too much cruft in the system
124+
> `/etc/fstab`.
122125
123126

124127
Running
@@ -157,8 +160,10 @@ enabled. The default Finit rescue mode configuration is installed into
157160

158161
By default the a root shell, without login, is started.
159162

160-
> **Note:** in this mode `initctl` will not work. Use the `-f` flag to
161-
> force `reboot`, `shutdown`, or `poweroff`.
163+
> [!IMPORTANT]
164+
> In rescue mode `initctl` will not work, the same goes for `reboot`,
165+
> `shutdown`, and `poweroff` commands, provided they are the Finit
166+
> versions of these commands. Use the `-f` flag to force the action.
162167
163168

164169
Debugging
@@ -187,8 +192,9 @@ kernel usually reboots: `configure --enable-emergency-shell`. However,
187192
the behavior of Finit is severely limited when this is enabled, so use
188193
it only for debugging start up issues when Finit crashes.
189194

190-
**NOTE:** Neither of these options should be enabled on production
191-
systems since they can potentially give a user root access.
195+
> [!CAUTION]
196+
> None of these options should be enabled on production systems since
197+
> they can potentially give a user root access.
192198
193199

194200
[1]: ftp://troglobit.com/finit/finit-4.3.tar.gz

doc/cmdline.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Tips & Tricks with the kernel cmdline
44
This document summarizes the different boot parameters that can be
55
passed on the Linux kernel command line. Not limited to Finit.
66

7-
The `bool` setting is one of `on, off, true false, 1, 0`.
7+
> [!IMPORTANT]
8+
> Remember to use `--` to separate kernel parameters from parameters to
9+
> init. E.g., `init=/sbin/finit -- finit.debug rescue`
810
9-
> **NOTE:** remember to use `--` to separate kernel parameters from
10-
> parameters to init. E.g., `init=/sbin/finit -- finit.debug rescue`
11+
The `bool` setting is one of `on, off, true false, 1, 0`.
1112

1213
* `debug`: Enable kernel debug. Debug messages are printed to the
1314
console until Finit starts up, unless `loglevel=7` (below) is used.
@@ -30,7 +31,8 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
3031
Very useful for selecting different boot modes, e.g. manufacturing test,
3132
firmware upgrade, or rescue mode.
3233

33-
> Note: `<boot/...>` conditions cannot be cleared with `initctl`!
34+
> [!NOTE]
35+
> `<boot/...>` conditions cannot be cleared with `initctl`!
3436
3537
* `finit.config=/path/to/alternative/finit.conf`: override the
3638
compile-time bootstrap config file, default:

doc/conditions.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ both the `pid/setupd` *and* `pid/zebra` conditions are satisfied. A
4747
`pid/` condition is satisfied by the corresponding service's PID file
4848
being created, i.e., the service's default readiness notification.
4949

50-
**NOTE:** Conditions also stop services when a condition is no longer
51-
asserted. I.e., if the Zebra process above stops or restarts, netd
52-
will also stop or restart.
50+
> [!IMPORTANT]
51+
> Conditions also stop services when a condition is no longer asserted.
52+
> I.e., if the `zebra` process above stops or restarts, `netd` will also
53+
> stop or restart.
5354
5455
Another example is `dropbear`, it does not support `SIGHUP`, but we can
5556
also see optional sourcing of arguments from an environment file:
@@ -106,11 +107,16 @@ on this, see [Internals](#internals).) Thus, after a reconfiguration it
106107
is up to the "owner" of the condition to convey the new (or possibly
107108
unchanged) state of it.
108109

109-
> **Note:** For `pid/` conditions it is expected that services "touch"
110-
> or recreate their PID file on `SIGHUP`.
111-
112110
Static (one-shot) conditions, like `usr/`, never enter the `flux` state.
113111

112+
> [!IMPORTANT]
113+
> For `pid/` conditions it is expected that the service reassert, i.e.,
114+
> "touch" or recreate, their PID file on `SIGHUP`. This can be done by
115+
> calling `utimensat()` on the PID file. Provided, of course, that the
116+
> service supports reloading on `SIGHUP`, otherwise it will be restarted
117+
> by Finit when they instead exit on the signal. For such services, use
118+
> `<!>` to tell Finit the service does not support `SIGHUP`.
119+
114120

115121
Built-in Conditions
116122
-------------------
@@ -171,9 +177,10 @@ Built-in conditions:
171177
- `boot/arg`
172178
- `dev/node` and `dev/dir/node`
173179

174-
**Note:** `up` means administratively up, the interface flag `IFF_UP`.
175-
`running` is the `IFF_RUNNING` flag, meaning operatively up. The
176-
difference is that `running` tells if the NIC has link.
180+
> [!NOTE]
181+
> Here, `up` means administratively up, the interface flag `IFF_UP`.
182+
> `running` is the `IFF_RUNNING` flag, meaning operatively up. The
183+
> difference is that `running` tells if the NIC has link.
177184
178185

179186
Composition
@@ -205,8 +212,9 @@ the service stanza for the daemon. It is far from optimal since any
205212
synchronization of depending services may fail due to the daemon not
206213
having reinitialized/created their IPC sockets, or similar.
207214

208-
> **Note:** in versions of Finit prior to v4, the PID conditions were
209-
> called 'svc' conditions, and they were far more complex.
215+
> [!NOTE]
216+
> In versions of Finit prior to v4, the PID conditions were called 'svc'
217+
> conditions, and they were far more complex.
210218
211219

212220
Debugging

0 commit comments

Comments
 (0)