keventd: add passive mode (-p) for coexistence with hotplug plugin

This is a backwards compatible mode for users upgrading and not noticing
that keventd is now build by default.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-08-16 22:03:30 +02:00
1 parent 8e91bb4297
commit db5567b5d1
3 files changed
+54 -32

No files matched your search

+8 -6
View File
@@ -221,7 +221,7 @@ battery:
Usage
-----
keventd [-cdGhnv] [-g GROUP]
keventd [-cdGhnpv] [-g GROUP]
Options:
-c Run coldplug at startup
@@ -230,6 +230,7 @@ Usage
-G Disable netlink rebroadcast entirely
-h Show help text
-n Run in foreground (no daemon)
-p Passive mode: power supply events only
-v Show version
In normal operation, Finit starts keventd automatically via its system
@@ -259,11 +260,12 @@ This means keventd can also be tested independently:
# Run without rebroadcast (e.g., headless embedded system)
keventd -c -G
When keventd is enabled, it conflicts with external device managers.
Only one device manager should be active at a time. The system
configuration uses the `conflict:` directive to enforce this:
service conflict:udevd,mdevd,mdev [...] keventd -c -- Finit device manager
Only one device manager should be active at a time. This is settled
at build time: with the hotplug plugin enabled, Finit starts keventd
in passive mode (`-p`), leaving device management to the udevd, mdevd,
or mdev service from `system/10-hotplug.conf` and monitoring only
power supply events. Without the hotplug plugin, keventd runs as the
system device manager (`keventd -c`).
[libudev-zero]: https://github.com/illiliti/libudev-zero
[mdevd]: https://skarnet.org/software/mdevd/