image.bbclass: enable systemd user services

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

(From OE-Core rev: cdc3b3028f6d71788b5fdd99436f69fbf18f613e)

Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Artur Kowalski 2025-01-20 13:46:06 +01:00 committed by Richard Purdie
parent 2ff2277ba3
commit 2d70424d66

View File

@ -702,6 +702,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
}