summaryrefslogtreecommitdiffstats
path: root/recipes-core/systemd
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2018-04-20 06:45:29 -0400
committerJoe MacDonald <joe_macdonald@mentor.com>2018-05-08 10:30:56 -0400
commit5d203f903979ba88b42dc141a795faadcb930873 (patch)
treeb055c29765a6910ff6e20b1531fc0df02ec5ef89 /recipes-core/systemd
parentd55fa69fa47d8f65f0339b5cda14a418ca6f7a64 (diff)
downloadmeta-selinux-5d203f903979ba88b42dc141a795faadcb930873.tar.gz
systemd: create /var/lib/systemd/backlight in advance
v2 changes: * Update patch for Yocto Compat - don't change layer's hash ============================================ The systemd-backlight@.service which called after selinux-init.service will create /var/lib/systemd/backlight with incorrect security labels, this causes the systemd-backlight service fails to start and stop. Creating /var/lib/systemd/backlight in advance to make sure it could always be relabelled by selinux-init while first booting. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'recipes-core/systemd')
-rw-r--r--recipes-core/systemd/systemd_%.bbappend2
-rw-r--r--recipes-core/systemd/systemd_selinux.inc7
2 files changed, 8 insertions, 1 deletions
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index 5ac3adb..7719d3b 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1 +1 @@
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)} require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)}
diff --git a/recipes-core/systemd/systemd_selinux.inc b/recipes-core/systemd/systemd_selinux.inc
new file mode 100644
index 0000000..b17e70a
--- /dev/null
+++ b/recipes-core/systemd/systemd_selinux.inc
@@ -0,0 +1,7 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)}
2
3do_install_append() {
4 if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
5 install -d ${D}${localstatedir}/lib/systemd/backlight
6 fi
7}