From: Laurentiu Palcu Date: Wed, 3 Jul 2013 14:16:46 +0000 (+0300) Subject: shutdown-desktop: give entire path in Exec field X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~36745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8507335951dc5fb10ae40dc7f6850608c703ecc3;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git shutdown-desktop: give entire path in Exec field A normal user does not have /sbin in its PATH, by default, so having the entire path here allows the correct execution when run as regular user. [YOCTO #4345] Signed-off-by: Laurentiu Palcu Signed-off-by: Saul Wold --- diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb index c5096c15309..773b438054a 100644 --- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb +++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb @@ -12,11 +12,13 @@ S = "${WORKDIR}" do_install() { install -d ${D}${datadir}/applications install -m 0644 shutdown.desktop ${D}${datadir}/applications/ + + sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#' } 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=\1/reboot#' \ || true }