3 # Start/stop the Bluetooth daemons
9 DAEMON_NAME
="bluetoothd"
15 DAEMON_EXEC
="/usr/sbin/bluetoothd"
16 HIDD_EXEC
="/usr/bin/hidd"
17 RFCOMM_EXEC
="/usr/bin/rfcomm"
18 PAND_EXEC
="/usr/bin/pand"
19 DUND_EXEC
="/usr/bin/dund"
27 RFCOMM_CONFIG
="/etc/bluetooth/rfcomm.conf"
33 [ -f /etc
/conf.d
/bluetooth
] && .
/etc
/conf.d
/bluetooth
37 stat_busy
"Starting bluetooth subsystem:"
38 if [ "$DAEMON_ENABLE" = "true" -a -x "$DAEMON_EXEC" ] ; then
39 stat_append
" $DAEMON_NAME"
43 if [ "$SDPD_ENABLE" = "true" -a -x "$SDPD_EXEC" ] ; then
44 stat_append
" $SDPD_NAME"
47 if [ "$HIDD_ENABLE" = "true" -a -x "$HIDD_EXEC" ]; then
48 stat_append
" $HIDD_NAME"
49 $HIDD_EXEC $HIDD_OPTIONS
51 if [ "$RFCOMM_ENABLE" = "true" -a -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ]; then
52 stat_append
" $RFCOMM_NAME"
53 $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all
55 if [ "$DUND_ENABLE" = "true" -a -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ]; then
56 stat_append
" $DUND_NAME"
57 $DUND_EXEC $DUND_OPTIONS
59 if [ "$PAND_ENABLE" = "true" -a -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ]; then
60 stat_append
" $PAND_NAME"
61 $PAND_EXEC $PAND_OPTIONS
67 stat_busy
"Stopping bluetooth subsystem:"
69 stat_append
" $PAND_NAME"
70 killall
$PAND_NAME >/dev
/null
2>&1
72 stat_append
" $DUND_NAME"
73 killall
$DUND_NAME >/dev
/null
2>&1
75 if [ -x "$RFCOMM_EXEC" ]; then
76 stat_append
" $RFCOMM_NAME"
77 $RFCOMM_EXEC release all
>/dev
/null
2>&1
80 stat_append
" $HIDD_NAME"
81 killall
$HIDD_NAME >/dev
/null
2>&1
83 stat_append
" $SDPD_NAME"
84 killall
$SDPD_NAME >/dev
/null
2>&1
86 stat_append
" $DAEMON_NAME"
87 killall
$DAEMON_NAME >/dev
/null
2>&1
98 echo "usage: $0 {start|stop|restart}"