]> code.ossystems Code Review - openembedded-core.git/commitdiff
shutdown-desktop: ensure the postinst script succeeds
authorRoss Burton <ross.burton@intel.com>
Thu, 4 Oct 2012 11:37:19 +0000 (12:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Oct 2012 13:04:09 +0000 (14:04 +0100)
When the hostname isn't qemuarm the grep fails so the postinst fails. Stop this
happening by explicitly evaluating true.

[YOCTO #3224]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb

index d0f507e6735df0fa9db90cb1ef065ae18f654514..c5096c15309adb0db0a8b1be547a0edbc62f8b32 100644 (file)
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
 SRC_URI = "file://shutdown.desktop"
 
+PR = "r1"
+
 S = "${WORKDIR}"
 
 do_install() {
@@ -14,7 +16,8 @@ do_install() {
 
 pkg_postinst_${PN} () {
     grep -q qemuarm $D${sysconfdir}/hostname && \
-        sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/'
+        sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/' \
+        || true
 }
 
 inherit allarch