1
# bluez - bluetooth daemon
3
description "bluetooth daemon"
8
env UART_CONF=/etc/bluetooth/uart
9
env RFCOMM_CONF=/etc/bluetooth/rfcomm.conf
13
exec /usr/sbin/bluetoothd
16
[ "$VERBOSE" = no ] && redirect='>/dev/null 2>&1' || redirect=
19
if [ -x /usr/sbin/hciattach ] && [ -f $UART_CONF ];
21
grep -v '^#' $UART_CONF | while read i; do
22
eval "/usr/sbin/hciattach $i $redirect" || :
27
if [ -x /usr/bin/rfcomm ] && [ -f $RFCOMM_CONF ] ;
29
# rfcomm must always succeed for now: users
30
# may not yet have an rfcomm-enabled kernel
31
eval "/usr/bin/rfcomm -f $RFCOMM_CONF bind all $redirect" || :
37
logger -t bluez "Stopping uarts"
38
killall hciattach >/dev/null 2>&1 || :
41
logger -t bluez "Stopping rfcomm"
42
if [ -x /usr/bin/rfcomm ];
44
eval "/usr/bin/rfcomm unbind all $redirect" || :