diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2007-01-14 23:21:36 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2007-01-14 23:21:36 +0000 |
commit | af9a0ccb79723bef3c597ea72e417de968164c99 (patch) | |
tree | 3c4276485e0ae825e5aa6d1298f6757f9a973805 /package/hal/init-hal | |
parent | 8cc56adc391887c5f156de83c65fdbba2f31a1fe (diff) | |
download | buildroot-novena-af9a0ccb79723bef3c597ea72e417de968164c99.tar.gz buildroot-novena-af9a0ccb79723bef3c597ea72e417de968164c99.zip |
Add new 'hal' package.
Diffstat (limited to 'package/hal/init-hal')
-rwxr-xr-x | package/hal/init-hal | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/package/hal/init-hal b/package/hal/init-hal new file mode 100755 index 000000000..40ea0f4d3 --- /dev/null +++ b/package/hal/init-hal @@ -0,0 +1,56 @@ +#!/bin/sh +# +# haldaemon: HAL daemon +# +# chkconfig: 345 98 02 +# description: This is a daemon for collecting and maintaing information \ +# about hardware from several sources. \ +# See http://www.freedesktop.org/Software/hal +# +# processname: hald +# pidfile: /var/run/haldaemon.pid +# + +# Sanity checks. +[ -x /usr/sbin/hald ] || exit 0 + +RETVAL=0 + +start() { + echo -n "Starting HAL daemon: " + hald + RETVAL=$? + echo "done" + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon +} + +stop() { + echo -n "Stopping HAL daemon: " + + killall hald + RETVAL=$? + echo "done" + if [ $RETVAL -eq 0 ]; then + rm -f /var/lock/subsys/haldaemon + rm -f /var/run/haldaemon.pid + fi +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 3 + start + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + ;; +esac +exit $RETVAL |