mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 09:16:36 +01:00
in container image, it don't have init system, install package modutils-initscripts will report error: + systemctl mask modutils.service /var/tmp/rpm-tmp.DYK3Pm: line 8: systemctl: command not found %post(modutils-initscripts-1.0-r7.3.cortexa72): waitpid(823) rc 823 status 7f00 warning: %post(modutils-initscripts-1.0-r7.3.cortexa72) scriptlet failed, exit status 127 fix by use same way as systemd.bbclass to decide if systemctl mask will run (From OE-Core rev: 922a668e769d3f51b0e8ec4949ae1936e9c59bc5) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit eec648f23df0a4e05130f8ef5a04902296567e38) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34 lines
762 B
BlitzBasic
34 lines
762 B
BlitzBasic
SUMMARY = "Initscript for auto-loading kernel modules on boot"
|
|
SECTION = "base"
|
|
LICENSE = "PD"
|
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
|
|
SRC_URI = "file://modutils.sh \
|
|
file://PD.patch"
|
|
|
|
PR = "r7"
|
|
|
|
S = "${WORKDIR}"
|
|
|
|
INITSCRIPT_NAME = "modutils.sh"
|
|
INITSCRIPT_PARAMS = "start 05 S ."
|
|
|
|
inherit update-rc.d
|
|
|
|
do_compile () {
|
|
}
|
|
|
|
do_install () {
|
|
install -d ${D}${sysconfdir}/init.d/
|
|
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
|
|
}
|
|
|
|
PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
|
|
pkg_postinst_${PN} () {
|
|
if type systemctl >/dev/null 2>/dev/null; then
|
|
if [ -n "$D" ]; then
|
|
OPTS="--root=$D"
|
|
fi
|
|
systemctl $OPTS mask modutils.service
|
|
fi
|
|
}
|