mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
selinux-image: Add new image class to label the rootfs, use it for selinux images.
Signed-off-by: Philip Tricca <flihp@twobit.us> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
parent
54e7104ef8
commit
56e952f43a
8
classes/selinux-image.bbclass
Normal file
8
classes/selinux-image.bbclass
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
selinux_set_labels () {
|
||||
POL_TYPE=$(sed -n -e "s&SELINUXTYPE[:space:]*=[:space:]*\([0-9A-Za-z_]\+\)&\1&p" ${IMAGE_ROOTFS}/${sysconfdir}/selinux/config)
|
||||
setfiles -r ${IMAGE_ROOTFS} ${IMAGE_ROOTFS}/${sysconfdir}/selinux/${POL_TYPE}/contexts/files/file_contexts ${IMAGE_ROOTFS} || exit 1;
|
||||
}
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND += "selinux_set_labels ;"
|
||||
|
||||
inherit core-image
|
||||
|
|
@ -12,4 +12,4 @@ IMAGE_INSTALL = "\
|
|||
packagegroup-selinux-minimal \
|
||||
"
|
||||
|
||||
inherit core-image
|
||||
inherit selinux-image
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ IMAGE_INSTALL = "\
|
|||
packagegroup-core-selinux \
|
||||
"
|
||||
|
||||
inherit core-image
|
||||
inherit selinux-image
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user