From: "alexander.heinisch via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Alexander Heinisch <alexander.heinisch@siemens.com>
Subject: [PATCH] classes/image-postproc: Enable systemd units based on systemd presets
Date: Thu, 26 Jun 2025 12:34:50 +0200 [thread overview]
Message-ID: <20250626103450.713318-1-alexander.heinisch@siemens.com> (raw)
From: Alexander Heinisch <alexander.heinisch@siemens.com>
By default population of the presets is automatically done by systemd
on first-boot.
There are several issues with that:
1. The rootfs we get as a build artifact does not reflect the actual
system running in the field.
2. For setups without writeable /etc this fails. With that addition
it happens already at build time. Note we are only enabling additional
services, so services enabled during the package installation won't be
changed.
Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
meta/classes/image-postproc-extension.bbclass | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/classes/image-postproc-extension.bbclass b/meta/classes/image-postproc-extension.bbclass
index 991bac4c..269b86c0 100644
--- a/meta/classes/image-postproc-extension.bbclass
+++ b/meta/classes/image-postproc-extension.bbclass
@@ -95,3 +95,8 @@ image_posprocess_disable_systemd_firstboot() {
fi
fi
}
+
+ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_populate_systemd_preset"
+image_postprocess_populate_systemd_preset() {
+ sudo chroot '${ROOTFSDIR}' systemctl preset-all --preset-mode="enable-only"
+}
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250626103450.713318-1-alexander.heinisch%40siemens.com.
next reply other threads:[~2025-06-26 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 10:34 alexander.heinisch via isar-users [this message]
2025-06-26 11:40 ` 'Jan Kiszka' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250626103450.713318-1-alexander.heinisch@siemens.com \
--to=isar-users@googlegroups.com \
--cc=alexander.heinisch@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox