diff options
-rw-r--r-- | meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb index 125f5fb073..7031ba142c 100644 --- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb +++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb @@ -18,3 +18,13 @@ do_install () { install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ } + +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask modutils.service + fi +} |