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:49:24 +0100 |
| commit | cf569f5def877b792a873e6612d26affbd480436 (patch) | |
| tree | 97f640b488f5938f91005debb7eeeb31dda79b6b | |
| parent | aa22868eba066a7bcea8f20bd0c70e215fd6424d (diff) | |
| download | poky-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>
| -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() { | |||
| 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 |
| 35 | for 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 |
| 43 | done | 46 | done |
| 44 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | 47 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null |
| 45 | EOF | 48 | EOF |
| 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 | } |
