[oe-commits] Otavio Salvador : hal: fix init script if $prefix is empty

git version control git at git.openembedded.org
Fri Jan 14 18:38:55 UTC 2011


Module: openembedded.git
Branch: master
Commit: 097294f7564ae5c613987acd341723ab69f43b2f
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=097294f7564ae5c613987acd341723ab69f43b2f

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Fri Jan 14 14:00:27 2011 -0200

hal: fix init script if $prefix is empty

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>

---

 recipes/hal/hal.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/recipes/hal/hal.inc b/recipes/hal/hal.inc
index d28436d..95c93b8 100644
--- a/recipes/hal/hal.inc
+++ b/recipes/hal/hal.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://freedesktop.org/Software/hal"
 SECTION = "unknown"
 LICENSE = "GPL LGPL AFL"
 
-INC_PR = "r10"
+INC_PR = "r11"
 
 SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz"
 
@@ -45,6 +45,11 @@ do_install_append() {
         install -d ${D}/${sysconfdir}/dbus-1/event.d
         install -m 0755 ${WORKDIR}/20hal ${D}/${sysconfdir}/dbus-1/event.d
 	rm -rf ${D}/${sysconfdir}/rc.d || true
+
+        # Handle case where prefix is empty
+        if [ -z "$prefix" ]; then
+                sed -i 's,/usr,,g' ${D}/${sysconfdir}/dbus-1/event.d/20hal
+        fi
 }
 
 # At the time the postinst runs, dbus might not be setup so only restart if running





More information about the Openembedded-commits mailing list