mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
The old implementation was wrong. It was not very generic and it checked IMAGE_FEATURES while building the recipe, which led to various issues with the generation of the final script. That is, the run-postinsts script was generated once, while building the package for the first time. Hence, any other changes to IMAGE_FEATURES, like removing/adding 'package-management' did not reflect in the final script. This commit makes run-postinsts script autodetect the backend used for creating the image, making it generic. [YOCTO #5666] [YOCTO #5972] (From OE-Core rev: 44902f7550e490a9d4d2e2bcdf8c577329b4af75) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
43 lines
1.2 KiB
BlitzBasic
43 lines
1.2 KiB
BlitzBasic
SUMMARY = "Runs postinstall scripts on first boot of the target device"
|
|
SECTION = "devel"
|
|
PR = "r9"
|
|
LICENSE = "MIT"
|
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
|
|
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
|
|
|
SRC_URI = "file://run-postinsts \
|
|
file://run-postinsts.init \
|
|
file://run-postinsts.service"
|
|
|
|
inherit allarch systemd update-rc.d
|
|
|
|
INITSCRIPT_NAME = "run-postinsts"
|
|
INITSCRIPT_PARAMS = "start 99 S ."
|
|
|
|
SYSTEMD_SERVICE_${PN} = "run-postinsts.service"
|
|
|
|
do_configure() {
|
|
:
|
|
}
|
|
|
|
do_compile () {
|
|
:
|
|
}
|
|
|
|
do_install() {
|
|
install -d ${D}${sbindir}
|
|
install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/
|
|
|
|
install -d ${D}${sysconfdir}/init.d/
|
|
install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts
|
|
|
|
install -d ${D}${systemd_unitdir}/system/
|
|
install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system/
|
|
|
|
sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
|
|
-e 's:#SBINDIR#:${sbindir}:g' \
|
|
-e 's:#BASE_BINDIR#:${base_bindir}:g' \
|
|
${D}${sbindir}/run-postinsts \
|
|
${D}${systemd_unitdir}/system/run-postinsts.service
|
|
}
|