fix version detection
[buildroot.git] / package / hal / S98haldaemon
blob40ea0f4d34cad3622c5720367f3e07d8b7fe2ab6
1 #!/bin/sh
3 # haldaemon: HAL daemon
5 # chkconfig: 345 98 02
6 # description: This is a daemon for collecting and maintaing information \
7 # about hardware from several sources. \
8 # See http://www.freedesktop.org/Software/hal
10 # processname: hald
11 # pidfile: /var/run/haldaemon.pid
14 # Sanity checks.
15 [ -x /usr/sbin/hald ] || exit 0
17 RETVAL=0
19 start() {
20 echo -n "Starting HAL daemon: "
21 hald
22 RETVAL=$?
23 echo "done"
24 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon
27 stop() {
28 echo -n "Stopping HAL daemon: "
30 killall hald
31 RETVAL=$?
32 echo "done"
33 if [ $RETVAL -eq 0 ]; then
34 rm -f /var/lock/subsys/haldaemon
35 rm -f /var/run/haldaemon.pid
39 # See how we were called.
40 case "$1" in
41 start)
42 start
44 stop)
45 stop
47 restart)
48 stop
49 sleep 3
50 start
53 echo $"Usage: $0 {start|stop|restart}"
55 esac
56 exit $RETVAL