mirror of
https://git.yoctoproject.org/poky
synced 2026-02-13 20:23:04 +01:00
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3197 311d38ba-8fff-0310-9ca6-ca027cbcb966
1.0 KiB
Executable File
1.0 KiB
Executable File
#! /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 --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