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:28 +0100 |
commit | 013157a38ad3a846be870f2ea41f067b5ca227b5 (patch) | |
tree | 4ed7748dc564d3ddd384e1015fb449f4ef478600 /meta | |
parent | 86f91a1ca279aaf49687aadc4256642196da4a42 (diff) | |
download | poky-013157a38ad3a846be870f2ea41f067b5ca227b5.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')
-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 | } |