summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/packages/hal/files/20hal58
-rw-r--r--meta/packages/hal/files/99_hal1
-rw-r--r--meta/packages/hal/hal_0.5.9.1.bb5
-rw-r--r--meta/packages/hal/hal_git.bb3
4 files changed, 67 insertions, 0 deletions
diff --git a/meta/packages/hal/files/20hal b/meta/packages/hal/files/20hal
new file mode 100755
index 0000000000..ff6ffc2b4c
--- /dev/null
+++ b/meta/packages/hal/files/20hal
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+# hal Start the Daemon that stores device informations
+# for the Hardware abstraction layer
+#
+# Written by Martin Waitz based on skeleton code
+# written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/hald
+PIDDIR=/var/run/hald
+PIDFILE=$PIDDIR/hald.pid
+NAME=hald
+DAEMONUSER=haldaemon
+DESC="Hardware abstraction layer"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+do_start() {
+ if [ ! -d $PIDDIR ]; then
+ mkdir -p $PIDDIR
+ chown $DAEMONUSER:$DAEMONUSER $PIDDIR
+ fi
+ echo "Starting $DESC" "$NAME"
+ start-stop-daemon --start --pidfile $PIDFILE \
+ --exec $DAEMON -- $DAEMON_OPTS
+}
+
+do_stop() {
+ echo "Stopping $DESC" "$NAME"
+ start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+}
+
+case "$1" in
+ start)
+ do_start
+ ;;
+ stop)
+ do_stop
+ ;;
+ restart|force-reload)
+ do_stop
+ sleep 5
+ do_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/packages/hal/files/99_hal b/meta/packages/hal/files/99_hal
index f3d477231e..c82da990ba 100644
--- a/meta/packages/hal/files/99_hal
+++ b/meta/packages/hal/files/99_hal
@@ -1 +1,2 @@
d root root 0700 /var/run/hald none
+d haldaemon haldaemon 0755 /var/cache/hald none
diff --git a/meta/packages/hal/hal_0.5.9.1.bb b/meta/packages/hal/hal_0.5.9.1.bb
index 4e3c7ed926..4c1b25aab1 100644
--- a/meta/packages/hal/hal_0.5.9.1.bb
+++ b/meta/packages/hal/hal_0.5.9.1.bb
@@ -7,8 +7,11 @@ DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb"
RDEPENDS += "udev hal-info"
RRECOMMENDS = "udev-utils"
+PR = "r1"
+
SRC_URI = "http://freedesktop.org/~david/dist/hal-${PV}.tar.gz \
file://sg-inhibit.patch;patch=1 \
+ file://20hal \
file://99_hal"
S = "${WORKDIR}/hal-${PV}"
@@ -30,6 +33,8 @@ EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
do_install_append() {
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
}
do_stage() {
diff --git a/meta/packages/hal/hal_git.bb b/meta/packages/hal/hal_git.bb
index 63e421efa4..e05927e515 100644
--- a/meta/packages/hal/hal_git.bb
+++ b/meta/packages/hal/hal_git.bb
@@ -9,6 +9,7 @@ RRECOMMENDS = "udev-utils"
SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
file://sg-inhibit.patch;patch=1 \
+ file://20hal \
file://99_hal"
PV = "0.5.9.1+git${SRCDATE}"
@@ -33,6 +34,8 @@ EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
do_install_append() {
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
}
do_stage() {