Patchwork [4/4] shutdown-desktop: give entire path in Exec field

login
register
mail settings
Submitter Laurentiu Palcu
Date July 3, 2013, 2:34 p.m.
Message ID <6e25853547047169deceef0d58123e70d4b54839.1372861799.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/52909/
State New
Headers show

Comments

Laurentiu Palcu - July 3, 2013, 2:34 p.m.
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>
---
 .../shutdown-desktop/shutdown-desktop.bb           |    2 +-
 .../shutdown-desktop/shutdown.desktop              |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
index c5096c1..8287813 100644
--- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
+++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
@@ -16,7 +16,7 @@  do_install() {
 
 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=/sbin/halt#Exec=/sbin/reboot#' \
         || true
 }
 
diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop b/meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop
index 2726889..23bd0f7 100644
--- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop
+++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop
@@ -3,8 +3,8 @@  Encoding=UTF-8
 Type=Application
 Name=Shutdown
 Comment=Close down the machine safely
-Exec=halt
+Exec=/sbin/halt
 Icon=system-shutdown
 Terminal=false
 Categories=Utility;
-StartupNotify=true
\ No newline at end of file
+StartupNotify=true