bluez/bluetooth.init

52 lines
856 B
Plaintext
Raw Normal View History

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