--- /dev/null
+#! /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
d root root 0700 /var/run/hald none
-d root root 0700 /var/cache/hald none
+d haldaemon haldaemon 0755 /var/cache/hald none
+++ /dev/null
-require hal.inc
-
-DEPENDS = "dbus expat"
-RDEPENDS += "hotplug"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
- --with-expat=${STAGING_LIBDIR}/.. \
- --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
- --with-hotplug=${sysconfdir}/hotplug.d"
+++ /dev/null
-require hal.inc
-
-DEPENDS = "dbus expat"
-RDEPENDS += "hotplug"
-RRECOMMENDS = "udev-utils"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
- --with-expat=${STAGING_LIBDIR}/.. \
- --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
- --with-hotplug=${sysconfdir}/hotplug.d"
-
-do_stage() {
- autotools_stage_includes
- install -d ${STAGING_LIBDIR}
- install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
- install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
+++ /dev/null
-require hal.inc
-
-DEPENDS = "dbus expat libusb"
-RDEPENDS += "hotplug"
-RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-PR = "r1"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
- --with-expat=${STAGING_LIBDIR}/.. \
- --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
- --with-hotplug=${sysconfdir}/hotplug.d \
- --disable-docbook-docs"
-
-do_stage() {
- autotools_stage_includes
- install -d ${STAGING_LIBDIR}
- install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
- install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-PACKAGES += "hal-device-manager"
-FILES_${PN} = "${sysconfdir} ${bindir}/lshal ${bindir}/hal-get-property ${bindir}/hal-set-property ${sbindir} ${libdir}/libhal.so* ${libdir}/libhal-storage.so* ${libexecdir} ${datadir}/hal/fdi"
-FILES_hal-device-manager = "${datadir}/hal/device-manager/ ${bindir}/hal-device-manager"
-
+++ /dev/null
-require hal.inc
-
-DEPENDS = "dbus expat libusb"
-RDEPENDS += "hotplug"
-#RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-
-SRC_URI += "file://dbus-fix-api.patch;patch=1"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
- --with-expat=${STAGING_LIBDIR}/.. \
- --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
- --with-hotplug=${sysconfdir}/hotplug.d \
- --disable-docbook-docs"
-
-do_stage() {
- autotools_stage_includes
- install -d ${STAGING_LIBDIR}
- install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
- install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-#PACKAGES += "hal-device-manager"
-FILES_${PN} = "${sysconfdir} \
- ${bindir}/lshal \
- ${bindir}/hal-find-by-capability \
- ${bindir}/hal-find-by-property \
- ${bindir}/hal-device \
- ${bindir}/hal-get-property \
- ${bindir}/hal-set-property \
- ${sbindir} \
- ${libdir}/libhal.so* \
- ${libdir}/libhal-storage.so* \
- ${libexecdir} \
- ${datadir}/hal/fdi \
- ${datadir}/hal/scripts"
-#FILES_hal-device-manager = " \
-# ${datadir}/hal/device-manager/ \
-# ${bindir}/hal-device-manager"
-
+++ /dev/null
-require hal.inc
-
-DEPENDS = "dbus-glib udev intltool expat libusb"
-RDEPENDS += "udev"
-#RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-
-PR = "r2"
-
-SRC_URI += "file://99_hal"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
- --with-expat=${STAGING_LIBDIR}/.. \
- --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
- --with-hotplug=${sysconfdir}/hotplug.d \
- --disable-docbook-docs \
- --disable-policy-kit \
- "
-
-do_install_append() {
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
-}
-
-do_stage() {
- autotools_stage_all
- install -d ${STAGING_LIBDIR}
- install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
- install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-# At the time the postinst runs, dbus might not be setup so only restart if running
-pkg_postinst_hal () {
- # can't do this offline
- if [ "x$D" != "x" ]; then
- exit 1
- fi
-
- /etc/init.d/populate-volatile.sh update
-
- grep haldaemon /etc/group || addgroup haldaemon
- grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
-
- DBUSPID=`pidof dbus-daemon`
-
- if [ "x$DBUSPID" != "x" ]; then
- /etc/init.d/dbus-1 force-reload
- fi
-}
-
-pkg_postrm_hal () {
- deluser haldaemon || true
- delgroup haldaemon || true
-}
-
-#PACKAGES += "hal-device-manager"
-
-#FILES_hal-device-manager = " \
-# ${datadir}/hal/device-manager/ \
-# ${bindir}/hal-device-manager"
-
-FILES_${PN} = "${sysconfdir} \
- ${bindir}/lshal \
- ${bindir}/hal-find-by-capability \
- ${bindir}/hal-find-by-property \
- ${bindir}/hal-device \
- ${bindir}/hal-get-property \
- ${bindir}/hal-set-property \
- ${sbindir} \
- ${libdir}/libhal.so* \
- ${libdir}/libhal-storage.so* \
- ${libdir}/hal \
- ${libexecdir} \
- ${datadir}/hal/fdi \
- ${datadir}/hal/scripts"
#RDEPENDS_hal-device-manager = "python hal python-pygnome"
RRECOMMENDS = "udev-utils"
-PR = "r1"
+PR = "r2"
-SRC_URI += "file://99_hal"
+SRC_URI += "file://99_hal \
+ file://20hal \
+ "
EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
--with-expat=${STAGING_LIBDIR}/.. \
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() {