diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-07-03 17:16:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-10 09:41:55 +0100 |
commit | 749fcafb080c41a9bc1e56880227e40d8dd70b88 (patch) | |
tree | a0e5a89aec53fd93a2591bcac54811b524aa70b9 /meta/recipes-sato | |
parent | ca48b14f08d2832df7ac18c1f5debc97f1c22bef (diff) | |
download | 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.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 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}" | |||
12 | do_install() { | 12 | do_install() { |
13 | install -d ${D}${datadir}/applications | 13 | install -d ${D}${datadir}/applications |
14 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ | 14 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ |
15 | |||
16 | sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#' | ||
15 | } | 17 | } |
16 | 18 | ||
17 | pkg_postinst_${PN} () { | 19 | pkg_postinst_${PN} () { |
18 | grep -q qemuarm $D${sysconfdir}/hostname && \ | 20 | grep -q qemuarm $D${sysconfdir}/hostname && \ |
19 | sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/' \ | 21 | sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \ |
20 | || true | 22 | || true |
21 | } | 23 | } |
22 | 24 | ||