Skip to contentSkip to conversation

initscripts: update postinst

PATCH New Changqing Li 1 participant 1 message Jun 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initscripts: update postinst

From: Changqing Li <[email protected]>

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

---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index 4080c4a495..32c527799e 100644
@@ -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
Signature · 1 line
2.17.1