2 # Copyright 1999-2007 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
6 UART_CONF="/etc/bluetooth/uart"
14 [ -f /usr/sbin/hciattach -a -f ${UART_CONF} ] || return
15 grep -v '^#' ${UART_CONF} | while read i; do
16 /usr/sbin/hciattach $i
21 killall hciattach > /dev/null 2>&1
25 if [ "${HID2HCI_ENABLE}" = "true" ]; then
26 ebegin "Switch from HID to HCI mode"
27 /usr/sbin/hid2hci -0 -q #be quiet
28 /bin/sleep 1 # delay for hid's to be detected by hotplug
32 if [ -f "${HCID_CONFIG}" ]; then
33 ebegin "Starting hcid"
34 start-stop-daemon --start --quiet \
35 --exec /usr/sbin/hcid -- -f $HCID_CONFIG
38 eerror "Not enabling hcid because HCID_CONFIG is missing."
47 #if [ "${HID2HCI_ENABLE}" = "true" ]; then
48 # ebegin "Switch from HCI to HID mode"
49 # /usr/sbin/hid2hci -1 -q #be quiet
50 # /bin/sleep 1 # delay for hid's to be detected by hotplug
53 ebegin "Stopping hcid"
54 start-stop-daemon --stop --quiet --exec /usr/sbin/hcid