summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-07-03 17:16:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-10 09:41:55 +0100
commit749fcafb080c41a9bc1e56880227e40d8dd70b88 (patch)
treea0e5a89aec53fd93a2591bcac54811b524aa70b9 /meta/recipes-sato
parentca48b14f08d2832df7ac18c1f5debc97f1c22bef (diff)
downloadast2050-yocto-poky-749fcafb080c41a9bc1e56880227e40d8dd70b88.zip
ast2050-yocto-poky-749fcafb080c41a9bc1e56880227e40d8dd70b88.tar.gz
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] (From OE-Core rev: 8507335951dc5fb10ae40dc7f6850608c703ecc3) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato')
-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 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
}
OpenPOWER on IntegriCloud