From: Renato Caldas <[email protected]>

This prevents the offline selinux relabeling from failing silently.

Signed-off-by: Renato Caldas <[email protected]>
---
 classes/selinux-image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/selinux-image.bbclass b/classes/selinux-image.bbclass
index 23645b7..51cfb57 100644
--- a/classes/selinux-image.bbclass
+++ b/classes/selinux-image.bbclass
@@ -2,7 +2,7 @@ selinux_set_labels () {
     POL_TYPE=$(sed -n -e 
"s&^SELINUXTYPE[[:space:]]*=[[:space:]]*\([0-9A-Za-z_]\+\)&\1&p" 
${IMAGE_ROOTFS}/${sysconfdir}/selinux/config)
     if ! setfiles -m -r ${IMAGE_ROOTFS} 
${IMAGE_ROOTFS}/${sysconfdir}/selinux/${POL_TYPE}/contexts/files/file_contexts 
${IMAGE_ROOTFS}
     then
-        echo WARNING: Unable to set filesystem context, setfiles / restorecon 
must be run on the live image.
+        bbwarn "Unable to set filesystem context, setfiles / restorecon must 
be run on the live image."
         touch ${IMAGE_ROOTFS}/.autorelabel
         exit 0
     fi
-- 
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60535): https://lists.yoctoproject.org/g/yocto/message/60535
Mute This Topic: https://lists.yoctoproject.org/mt/99991539/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to