summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-10 14:36:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-10 16:49:24 +0100
commitcf569f5def877b792a873e6612d26affbd480436 (patch)
tree97f640b488f5938f91005debb7eeeb31dda79b6b /meta/recipes-devtools/rpm
parentaa22868eba066a7bcea8f20bd0c70e215fd6424d (diff)
downloadpoky-cf569f5def877b792a873e6612d26affbd480436.tar.gz
rpm-postinsts: avoid errors during boot with read-only-rootfs enabled
* If /etc/rpm-postinsts doesn't exist, don't error * If deleting the script errors, don't bother printing it (this will always happen if the root filesystem is read-only) (From OE-Core rev: f787b8302ed61bdaf1767473b856f31fe5bba28e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm-postinsts.bb7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb
index 0a62da0c3c..fb05ad6d51 100644
--- a/meta/recipes-devtools/rpm/rpm-postinsts.bb
+++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb
@@ -32,7 +32,10 @@ do_install() {
32 i=\$i 32 i=\$i
33 cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF 33 cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
34#!/bin/sh 34#!/bin/sh
35for i in \`ls /etc/rpm-postinsts/\`; do 35
36. /etc/default/rcS
37
38[ -d /etc/rpm-postinsts ] && for i in \`ls /etc/rpm-postinsts/ \`; do
36 i=/etc/rpm-postinsts/$i 39 i=/etc/rpm-postinsts/$i
37 echo "Running postinst $i..." 40 echo "Running postinst $i..."
38 if [ -f $i ] && $i ${REDIRECT_CMD}; then 41 if [ -f $i ] && $i ${REDIRECT_CMD}; then
@@ -41,7 +44,7 @@ for i in \`ls /etc/rpm-postinsts/\`; do
41 echo "ERROR: postinst $i failed." 44 echo "ERROR: postinst $i failed."
42 fi 45 fi
43done 46done
44rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 47rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null
45EOF 48EOF
46 chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 49 chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
47} 50}