summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-02-24 20:06:25 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-07 11:14:38 +0000
commit0276db5e64e2a233c673e55c3ac1fdefe3030f39 (patch)
tree8c1a3a40572e2a4811a369bc1422ba01a7595a4c
parentd5cfb00f080b68c09660d222437518813816da82 (diff)
downloadpoky-0276db5e64e2a233c673e55c3ac1fdefe3030f39.tar.gz
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] (From OE-Core rev: 378504c1c0ab1e0e09950b37effc04221b928236) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc5
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() {
57 fi 57 fi
58} 58}
59 59
60POSTLOG ?= "/var/log/postinstall.log"
61REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
62
60pkg_postinst_${PN} () { 63pkg_postinst_${PN} () {
61#!/bin/sh 64#!/bin/sh
62if [ "x$D" != "x" ]; then 65if [ "x$D" != "x" ]; then
63 install -d $D${sysconfdir}/rcS.d 66 install -d $D${sysconfdir}/rcS.d
64 # this happens at S98 where our good 'ole packages script used to run 67 # this happens at S98 where our good 'ole packages script used to run
65 echo "#!/bin/sh 68 echo "#!/bin/sh
66opkg-cl configure 69opkg-cl configure ${REDIRECT_CMD}
67rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 70rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
68" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 71" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
69 chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 72 chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts