summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/rpm/rpm-postinsts.bb17
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb
index 3c0f520d28..c8fc1c33f4 100644
--- a/meta/recipes-devtools/rpm/rpm-postinsts.bb
+++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb
@@ -9,10 +9,6 @@ inherit allarch
9# 9#
10POSTINSTALL_INITPOSITION ?= "98" 10POSTINSTALL_INITPOSITION ?= "98"
11 11
12POSTLOG ?= "/var/log/postinstall.log"
13REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}"
14REDIRECT_CMD[vardepsexclude] += "IMAGE_FEATURES POSTLOG"
15
16do_fetch() { 12do_fetch() {
17 : 13 :
18} 14}
@@ -34,11 +30,16 @@ if [ "x$D" != "x" ] && [ -f $D/var/lib/rpm/Packages ]; then
34 install -d $D/${sysconfdir}/rcS.d 30 install -d $D/${sysconfdir}/rcS.d
35 cat > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << "EOF" 31 cat > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << "EOF"
36#!/bin/sh 32#!/bin/sh
37 33[ -e ${sysconfdir}/default/postinst ] && . ${sysconfdir}/default/postinst
38[ -d /etc/rpm-postinsts ] && for i in `ls /etc/rpm-postinsts/`; do 34[ -d ${sysconfdir}/rpm-postinsts ] && for i in `ls ${sysconfdir}/rpm-postinsts/`; do
39 i=/etc/rpm-postinsts/$i 35 i=${sysconfdir}/rpm-postinsts/$i
40 echo "Running postinst $i..." 36 echo "Running postinst $i..."
41 if [ -f $i ] && $i ${REDIRECT_CMD}; then 37 if [ -x $i ]; then
38 if [ "$POSTINST_LOGGING" = "1" ]; then
39 $i >>$LOGFILE 2&>1
40 else
41 $i
42 fi
42 rm $i 43 rm $i
43 else 44 else
44 echo "ERROR: postinst $i failed." 45 echo "ERROR: postinst $i failed."