diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-04-10 14:36:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-10 16:48:46 +0100 |
commit | f787b8302ed61bdaf1767473b856f31fe5bba28e (patch) | |
tree | 50825d4f449829f27942446ac472ce6b157e7820 /meta/recipes-devtools/rpm | |
parent | d196d08acafe599c16a7ac8e04121039b1216ba6 (diff) | |
download | openembedded-core-f787b8302ed61bdaf1767473b856f31fe5bba28e.tar.gz openembedded-core-f787b8302ed61bdaf1767473b856f31fe5bba28e.tar.bz2 openembedded-core-f787b8302ed61bdaf1767473b856f31fe5bba28e.zip |
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)
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.bb | 7 |
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() { i=\$i cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF #!/bin/sh -for i in \`ls /etc/rpm-postinsts/\`; do + +. /etc/default/rcS + +[ -d /etc/rpm-postinsts ] && for i in \`ls /etc/rpm-postinsts/ \`; do i=/etc/rpm-postinsts/$i echo "Running postinst $i..." if [ -f $i ] && $i ${REDIRECT_CMD}; then @@ -41,7 +44,7 @@ for i in \`ls /etc/rpm-postinsts/\`; do echo "ERROR: postinst $i failed." fi done -rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts +rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null EOF chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts } |