org.osbuild.systemd: Support masking generators

This adds a new key masked_generators, similar to masked_services,
which masks systemd generators from running at boot, by creating
symlinks to /dev/null in /etc/systemd/systemd-generators, as
described in:
 https://www.freedesktop.org/software/systemd/man/latest/systemd.generator.html#Description

This will be useful for the automotive project, as it allows disabling
of unsupported things like sysv or rc.local legacy support, while
improving boot performance.
This commit is contained in:
Alexander Larsson 2023-12-14 13:46:00 +01:00 committed by Brian C. Lane
parent dfd59a38d9
commit 69028fc016
4 changed files with 23 additions and 1 deletions

View file

@ -649,6 +649,9 @@
"masked_services": [
"ldconfig"
],
"masked_generators": [
"systemd-sysv-generator"
],
"disabled_services": [
"sshd"
]

View file

@ -35,5 +35,7 @@ pipelines:
- nftables
masked_services:
- ldconfig
masked_generators:
- systemd-sysv-generator
disabled_services:
- sshd

View file

@ -1,7 +1,9 @@
{
"added_files": [
"/etc/systemd/system/ldconfig.service",
"/etc/systemd/system/multi-user.target.wants/nftables.service"
"/etc/systemd/system/multi-user.target.wants/nftables.service",
"/etc/systemd/system-generators",
"/etc/systemd/system-generators/systemd-sysv-generator"
],
"deleted_files": [
"/etc/systemd/system/multi-user.target.wants/sshd.service"