]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: update postinst
authorChangqing Li <changqing.li@windriver.com>
Tue, 30 Jun 2020 09:50:53 +0000 (17:50 +0800)
committerSteve Sakoman <steve@sakoman.com>
Tue, 7 Jul 2020 00:33:20 +0000 (14:33 -1000)
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.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 790276bde066ecc9876120c3097dcd57a9936f00)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/initscripts/initscripts_1.0.bb

index 1a59b82fbfe028fa596a1aca3723f3d6659ea1c2..f98e42eb2eb5088836d811e2ded9289f57dcd252 100644 (file)
@@ -169,7 +169,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