From d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Sep 2010 19:09:11 +0100 Subject: packages: Separate out most of the remaining packages into recipes Signed-off-by: Richard Purdie --- meta/recipes-support/hal/files/20hal | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 meta/recipes-support/hal/files/20hal (limited to 'meta/recipes-support/hal/files/20hal') diff --git a/meta/recipes-support/hal/files/20hal b/meta/recipes-support/hal/files/20hal new file mode 100755 index 0000000000..5b97c4f9e6 --- /dev/null +++ b/meta/recipes-support/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 . +# Modified for Debian +# by Ian Murdock . +# + +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 --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 -- cgit v1.2.3-54-g00ecf