@@ -1,5 +1,11 @@
inherit enable-selinux enable-audit
+# The systemd-backlight@.service which is called after selinux-init.service
+# will create /var/lib/systemd/backlight with incorrect security labels,
+# this causes the systemd-backlight service to fail to start and to stop.
+#
+# Creating /var/lib/systemd/backlight in advance to make sure it could
+# always be relabelled by selinux-init while first booting.
do_install:append() {
if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
install -d ${D}${localstatedir}/lib/systemd/backlight
The reasoning is taken from commit 5d203f903979 ("systemd: create /var/lib/systemd/backlight in advance"). --- recipes-core/systemd/systemd_selinux.inc | 6 ++++++ 1 file changed, 6 insertions(+) base-commit: 1db6bf1b573b9c908752602c1e2b6a30368da3b7