mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
modutils-initscripts: mask modutils in case of systemd
We need to prevent the init script from running via systemd because its functionality has been implemented interanlly in systemd. In a systemd system, we can add configuration files under /etc/modules-load.d/ to make things work. (From OE-Core rev: 8fc304a59bb3977146645fe2c3570a3aaa4aac39) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user