diff options
author | Gary Thomas <gary@mlbassoc.com> | 2011-04-18 08:23:27 -0600 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-04-22 22:03:56 -0700 |
commit | a46466893407d44dd16ab37ae70e1bee14bdde0a (patch) | |
tree | cab7368e9bc977c4cc112171c22a46279697247e /meta/classes/rootfs_rpm.bbclass | |
parent | a0629aa0dc55829565b7ab1725875eac065ab2f1 (diff) | |
download | openembedded-core-a46466893407d44dd16ab37ae70e1bee14bdde0a.tar.gz openembedded-core-a46466893407d44dd16ab37ae70e1bee14bdde0a.tar.bz2 openembedded-core-a46466893407d44dd16ab37ae70e1bee14bdde0a.zip |
Control over when package init scripts are run
When a package is built, some installation scripts must be
performed on the target. In the case of a complete image,
these scripts are run by a separate step at init time, but
only during the first boot (other package install scripts
can just be run when the package is installed on the target).
This patch lets the distribution (or user) decide when these
postponed install scripts should run. The default is normally
near the end of init, but there may be times when it's beneficial
to run them earlier so the "when" can be overridden.
Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index aa1b339550..3a11858cd0 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass @@ -26,6 +26,11 @@ RPM_POSTPROCESS_COMMANDS = "" # #IMAGE_LOCALES="en-gb" +# +# Allow distributions to alter when [postponed] package install scripts are run +# +POSTINSTALL_INITPOSITION ?= "98" + rpmlibdir = "/var/lib/rpm" opkglibdir = "${localstatedir}/lib/opkg" @@ -116,7 +121,7 @@ EOF install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d # Stop $i getting expanded below... i=\$i - cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S98configure << EOF + cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure << EOF #!/bin/sh for i in /etc/rpm-postinsts/*.sh; do echo "Running postinst $i..." @@ -127,9 +132,9 @@ for i in /etc/rpm-postinsts/*.sh; do echo "ERROR: postinst $i failed." fi done -rm -f ${sysconfdir}/rcS.d/S98configure +rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure EOF - chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S98configure + chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure install -d ${IMAGE_ROOTFS}/${sysconfdir} echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version |