diff mbox series

[8/8] image.bbclass: enable systemd user services

Message ID 20250922080151.3483394-9-jie.gu@leica-geosystems.com
State Accepted, archived
Commit cdc3b3028f6d71788b5fdd99436f69fbf18f613e
Headers show
Series Backport systemd user presets support | expand

Commit Message

jiegu Sept. 22, 2025, 8:01 a.m. UTC
From: Artur Kowalski <arturkow2000@gmail.com>

Run systemctl preset-all with --global flag so user unit's are enabled
the same way system units are.

Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cdc3b3028f6d71788b5fdd99436f69fbf18f613e)
---
 meta/classes-recipe/image.bbclass | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 1f0ee1861e..0c3b396857 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -670,6 +670,7 @@  reproducible_final_image_task () {
 systemd_preset_all () {
     if [ -e ${IMAGE_ROOTFS}${root_prefix}/lib/systemd/systemd ]; then
 	systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
+	systemctl --root="${IMAGE_ROOTFS}" --global --preset-mode=enable-only preset-all
     fi
 }