summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-07-03 17:16:46 +0300
committerSaul Wold <sgw@linux.intel.com>2013-07-09 07:56:12 -0700
commit8507335951dc5fb10ae40dc7f6850608c703ecc3 (patch)
tree8325b94da8a88c0794b429aef1c3a5e65ab9ad80 /meta
parent8536c410c54956027807e80f37586fb1f4d29af9 (diff)
downloadopenembedded-core-8507335951dc5fb10ae40dc7f6850608c703ecc3.tar.gz
openembedded-core-8507335951dc5fb10ae40dc7f6850608c703ecc3.tar.bz2
openembedded-core-8507335951dc5fb10ae40dc7f6850608c703ecc3.zip
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@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb4
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 c5096c1530..773b438054 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
}