mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
selinux-autorelabel: enable labeling during build
Previously, system using systemd would label selinux contexts on first boot. While system using sysvinit would label during build. Add a variable FIRST_BOOT_RELABEL as a switch to control labeling to make the behavior of sysvinit and systemd consistent. Set FIRST_BOOT_RELABEL to 1 in local.conf to enable labeling on first boot. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
parent
46ec0414b4
commit
e29104086e
|
|
@ -20,7 +20,7 @@ INITSCRIPT_PARAMS = "start 01 S ."
|
|||
require selinux-initsh.inc
|
||||
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
echo "# first boot relabelling" > ${D}/.autorelabel
|
||||
fi
|
||||
if ${@bb.utils.contains('FIRST_BOOT_RELABEL', '1', 'true', 'false', d)}; then
|
||||
echo "# first boot relabelling" > ${D}/.autorelabel
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user