From: Changqing Li <changqing...@windriver.com>

in container image, it don't have init system,
install package initscripts will report error:
systemctl: command not found

fix by use same way as systemd.bbclass to decide if systemctl
mask will run

Signed-off-by: Changqing Li <changqing...@windriver.com>
---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb 
b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 4080c4a495..32c527799e 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -170,7 +170,7 @@ MASKED_SCRIPTS = " \
   urandom"
 
 pkg_postinst_${PN} () {
-       if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+       if type systemctl >/dev/null 2>/dev/null; then
                if [ -n "$D" ]; then
                        OPTS="--root=$D"
                fi
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#140129): 
https://lists.openembedded.org/g/openembedded-core/message/140129
Mute This Topic: https://lists.openembedded.org/mt/75210665/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to