All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-selinux][PATCH] selinux-image.bbclass: use bbwarn for warning instead of echo
@ 2023-07-06 18:29 Renato Caldas
  0 siblings, 0 replies; only message in thread
From: Renato Caldas @ 2023-07-06 18:29 UTC (permalink / raw)
  To: yocto; +Cc: Renato Caldas

From: Renato Caldas <renato@calgera.com>

This prevents the offline selinux relabeling from failing silently.

Signed-off-by: Renato Caldas <renato@calgera.com>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-06 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06 18:29 [meta-selinux][PATCH] selinux-image.bbclass: use bbwarn for warning instead of echo Renato Caldas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.