Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 2cadaa502ea3ef1258708c955dd26c21 > files > 11

bluez-4.33-3.2mdv2009.1.x86_64.rpm

#!/bin/sh
#
# dund:		Bluetooth Human Interface Device Daemon.
#
# chkconfig:	- 26 59
# description:	Bluetooth Human Interface Device Daemon. Provides keyboard,
#		mouse etc. functionality over Bluetooth.
#
### BEGIN INIT INFO
# Provides: hidd
# Required-Start: bluetooth
# Required-Stop: bluetooth
# Short-Description: Bluetooth Human Interface Device Daemon
# Description: Bluetooth Human Interface Device Daemon.
#              Provides keyboard, mouse etc. functionality over Bluetooth.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

. /etc/sysconfig/network

[ ${NETWORKING} = "no" ] && exit 0

[ -r /etc/sysconfig/hidd ] || exit 0

. /etc/sysconfig/hidd

[ -z "$HIDDARGS" ] && exit 0

start() 
{
        gprintf "Starting hidd: "
        daemon /sbin/hidd $HIDDARGS

	touch /var/lock/subsys/hidd
        echo
}

stop() 
{
        gprintf "Shutting down hidd: "
	/sbin/hidd -K
	killproc hidd

	rm -f  /var/lock/subsys/hidd
        echo
}

[ -f /sbin/hidd ] || exit 0

# See how we were called.
case "$1" in
  start)
	start
        ;;
  stop)
	stop
        ;;
  restart|reload)
	stop
	start
	;;
  condrestart)
	[ -e /var/lock/subsys/hidd ] && (stop; start)
	;;
  status)
  	status hidd
  	exit $?
	;;
  *)
        gprintf "Usage: %s {start|stop|restart|reload|condrestart|status}\n" "$0"
        exit 1
esac

exit 0