Skip to content

Commit 6560968

Browse files
committed
doc: update feature list
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent c9a3c5c commit 6560968

2 files changed

Lines changed: 100 additions & 14 deletions

File tree

doc/features.md

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

4+
This page highlights some of Finit's key features with examples and usage
5+
scenarios. For complete documentation, configuration syntax, and advanced
6+
options, see the [Configuration](config/index.md) section.
7+
48
**Process Supervision**
59

610
Start, monitor and restart services should they fail.
@@ -162,6 +166,28 @@ See the [Linux Capabilities](config/capabilities.md) section for detailed
162166
information, examples, and security best practices.
163167

164168

169+
**Supplementary Groups**
170+
171+
Finit supports supplementary groups for services, allowing them to access
172+
resources owned by multiple groups without running as root. This complements
173+
capabilities for fine-grained privilege control.
174+
175+
```conf
176+
service @caddy:caddy,ssl-cert /usr/bin/caddy run
177+
```
178+
179+
In this example, the Caddy web server runs as user `caddy` with primary group
180+
`caddy`, but also has access to resources owned by the `ssl-cert` group (such
181+
as TLS certificates).
182+
183+
Finit automatically reads the user's supplementary group membership from
184+
`/etc/group`. Additional groups can be specified explicitly using the syntax
185+
`@user:group,sup1,sup2,...`.
186+
187+
See the [Non-privileged Services](config/services.md#non-privileged-services)
188+
section for more information.
189+
190+
165191
**Cgroups**
166192

167193
Finit supports cgroups v2 and comes with the following default groups in
@@ -207,4 +233,59 @@ commands for details.
207233
> disabled early at boot.
208234
209235

236+
**Service Management**
237+
238+
Finit includes the `initctl` tool for managing services and system state at
239+
runtime. Key capabilities include:
240+
241+
- **Enable/Disable services**: Manage which services start at boot by moving
242+
configuration files between `/etc/finit.d/available` and
243+
`/etc/finit.d/enabled`
244+
- **Start/Stop/Restart**: Control individual services without requiring a
245+
full system reboot
246+
- **Status monitoring**: View service state, PID, uptime, and resource usage
247+
- **Condition management**: Set and clear user-defined conditions to control
248+
service dependencies
249+
- **Cgroup monitoring**: Real-time process and resource monitoring with
250+
`initctl top`, similar to the traditional `top` command but cgroup-aware
251+
252+
Example commands:
253+
254+
```bash
255+
initctl enable myservice # Enable service for next boot
256+
initctl start myservice # Start service now
257+
initctl status # Show all services
258+
initctl top # Interactive resource monitor
259+
initctl cond set usr/custom # Set custom condition
260+
```
261+
262+
See the [Commands & Status](initctl.md) section for complete documentation.
263+
264+
265+
**Rescue Mode**
266+
267+
Finit provides a built-in rescue mode for system recovery and maintenance.
268+
When booting with the `rescue` kernel parameter, the system enters a
269+
protected maintenance shell.
270+
271+
If the bundled `sulogin` program is available (from Finit, util-linux, or
272+
BusyBox), you'll be prompted for the root password before accessing the
273+
maintenance shell. This provides secure access for system recovery.
274+
275+
If `sulogin` is not available, Finit falls back to reading
276+
`/lib/finit/rescue.conf` and boots the system in a limited maintenance mode.
277+
278+
```
279+
# Kernel command line
280+
linux /vmlinuz root=/dev/sda1 rescue
281+
```
282+
283+
In rescue mode, `initctl` will not work. After fixing the problem, use
284+
`reboot -f` to force reboot.
285+
286+
Rescue mode can be disabled at build time with `configure --without-rescue`.
287+
288+
See the [Rescue Mode](config/rescue.md) section for more information.
289+
290+
210291
[5]: https://en.wikipedia.org/wiki/Runlevel

doc/index.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Introduction
22
============
33

4-
![Alpine screenshot](img/alpine-screenshot2.png){ align=right }
4+
![Alpine screenshot](img/alpine-screenshot2.png){ align=right width=40% }
55

66
> Reverse engineered from the [EeePC fastinit][]
77
> "gaps filled with frog DNA …"
@@ -17,26 +17,30 @@ PID file monitoring, or [conditions](conditions.md).
1717
Features
1818
--------
1919

20-
* [Runlevels][5], defined per service
21-
* One-shot tasks, services (daemons), or [SysV init][4] start/stop scripts
22-
* Runparts and `/etc/rc.local` support
20+
* [Runlevels](config/runlevels.md), defined per service
21+
* [One-shot tasks](config/task-and-run.md), [services](config/services.md) (daemons), or [SysV init][4] start/stop scripts
22+
* [Runparts](config/runparts.md) and `/etc/rc.local` support
2323
* Process supervision similar to [systemd][]
24-
* Sourcing environment files
25-
* Conditions for network/process/custom dependencies
26-
* Readiness notification; PID files (native) for synchronizing system
24+
* Fine-grained privilege control:
25+
- [Linux capabilities](config/capabilities.md) for minimal required privileges
26+
- [Supplementary groups](config/services.md#non-privileged-services) for multi-group resource access
27+
* [Sourcing environment files](config/service-env.md)
28+
* [Conditions](conditions.md) for network/process/custom dependencies
29+
* [Readiness notification](config/service-sync.md); PID files (native) for synchronizing system
2730
startup, support for systemd [sd_notify()][], or [s6 style][] too
2831
* Limited support for [tmpfiles.d(5)][] (no aging, attributes, or subvolumes)
29-
* Pre/Post script actions
32+
* [Pre/Post script actions](config/service-wrappers.md)
3033
* Rudimentary [templating support](config/templating.md)
31-
* Tooling to enable/disable services
32-
* Built-in getty
34+
* [Tooling](initctl.md) to enable/disable services
35+
* [Automatic reload](features.md#automatic-reload) of modified configuration files (optional)
36+
* [Built-in getty](config/tty.md)
3337
* Built-in watchdog, with support for hand-over to [watchdogd][]
3438
* Built-in support for Debian/BusyBox [`/etc/network/interfaces`][3]
35-
* Cgroups v2, both configuration and monitoring in `initctl top`
36-
* Plugin support for customization
37-
* Proper rescue mode with bundled `sulogin` for protected maintenance shell
39+
* [Cgroups v2](config/cgroups.md), both configuration and monitoring in [`initctl top`](initctl.md)
40+
* [Plugin support](plugins.md) for customization
41+
* Proper [rescue mode](config/rescue.md) with bundled `sulogin` for protected maintenance shell
3842
* Integration with [watchdogd][] for full system supervision
39-
* Logging to kernel ring buffer before `syslogd` has started, see the
43+
* [Logging](config/logging.md) to kernel ring buffer before `syslogd` has started, see the
4044
recommended [sysklogd][] project for complete logging integration
4145
and how to log to the kernel ring buffer from scripts using `logger`
4246

@@ -64,6 +68,7 @@ and proposed extensions.
6468
[4]: https://en.wikipedia.org/wiki/Init
6569
[5]: https://en.wikipedia.org/wiki/Runlevel
6670
[6]: https://github.com/finit-project/finit
71+
[dinit]: https://davmac.org/projects/dinit/
6772
[systemd]: https://www.freedesktop.org/wiki/Software/systemd/
6873
[sd_notify()]: https://www.freedesktop.org/software/systemd/man/sd_notify.html
6974
[s6 style]: https://skarnet.org/software/s6/notifywhenup.html

0 commit comments

Comments
 (0)