diff options
author | Kang Kai <kai.kang@windriver.com> | 2013-02-24 20:06:25 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-07 11:11:38 +0000 |
commit | 378504c1c0ab1e0e09950b37effc04221b928236 (patch) | |
tree | 61e6e44a96e078d3d9dd691caf859dd11b70e651 /meta/recipes-devtools/opkg/opkg.inc | |
parent | b2a74ae70725be7efc0226901fd560d3b3b48607 (diff) | |
download | openembedded-core-378504c1c0ab1e0e09950b37effc04221b928236.tar.gz openembedded-core-378504c1c0ab1e0e09950b37effc04221b928236.tar.bz2 openembedded-core-378504c1c0ab1e0e09950b37effc04221b928236.zip |
opkg: save output of postinst scripts when image first boot
When image feature "debug-tweaks" enabled, save output of postinstall
scripts to log file /var/log/postinstall.log when image first boot. And the
log file can be configured.
It also needs image feature "package-management" enabled. If not,
package run-postinsts will be installed and then all packages will be
configured by it. Command 'opkg configure' outputs nothing.
[YOCTO #3223]
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg.inc')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc index 8d48006d64..f9c120257b 100644 --- a/meta/recipes-devtools/opkg/opkg.inc +++ b/meta/recipes-devtools/opkg/opkg.inc @@ -57,13 +57,16 @@ do_install_append_class-native() { fi } +POSTLOG ?= "/var/log/postinstall.log" +REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}" + pkg_postinst_${PN} () { #!/bin/sh if [ "x$D" != "x" ]; then install -d $D${sysconfdir}/rcS.d # this happens at S98 where our good 'ole packages script used to run echo "#!/bin/sh -opkg-cl configure +opkg-cl configure ${REDIRECT_CMD} rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts " > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts |