[oe-commits] Laurentiu Palcu : shutdown-desktop: give entire path in Exec field
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 10 08:37:56 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: 8507335951dc5fb10ae40dc7f6850608c703ecc3
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8507335951dc5fb10ae40dc7f6850608c703ecc3
Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date: Wed Jul 3 17:16:46 2013 +0300
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 <laurentiu.palcu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
.../shutdown-desktop/shutdown-desktop.bb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
index c5096c1..773b438 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
}
More information about the Openembedded-commits
mailing list