]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Jun 2020 22:02:11 +0000 (23:02 +0100)
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>
meta/recipes-core/initscripts/initscripts_1.0.bb

index 4080c4a495f0d96ad5f5307749fde2d6e9d7505c..32c527799ead2838fa97d92e7fb8cd367395db62 100644 (file)
@@ -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