#!/bin/sh
#
# chkconfig: 345 50 83
# description: Turn HID adapters into Bluetooth ones
#
### BEGIN INIT INFO
# Short-Description: Turn HID adapters into Bluetooth ones
# Description: Turn HID adapters into Bluetooth ones
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
[ -e /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
start()
{
echo -n $"Starting hid2hci:"
[ "$HID2HCI_ENABLE" = "true" ] && hid2hci --tohci > /dev/null 2>&1 || :
RETVAL=$?
touch /var/lock/subsys/bluetooth
echo ""
return $RETVAL
}
stop()
{
echo -n "Stopping Bluetooth services:"
[ "$HID2HCI_UNDO" = "true" ] && hid2hci --tohid > /dev/null 2>&1 || :
RETVAL=$?
echo ""
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
RETVAL=0
;;
*)
echo $"Usage: $0 {start|stop|status}"
exit 3
;;
esac
exit $RETVAL