- if [ ! -f /var/lock/subsys/bluetooth ]; then
- if is_yes "${DAEMON_ENABLE}" && [ -x /usr/sbin/bluetoothd ]; then
- msg_starting bluetooth
- daemon /usr/sbin/bluetoothd
- RETVAL=$?
- fi
-
- if is_yes "${HID2HCI_ENABLE}" && [ -x /usr/sbin/hid2hci ]; then
- msg_starting hid2hci
- daemon /usr/sbin/hid2hci -0 -q #be quiet
- RETVAL=$?
- /bin/sleep 1 # delay for hid's to be detected by hotplug
- fi
-
- if is_yes "${HCID_ENABLE}" && [ -x /usr/sbin/hcid ]; then
- HCID_FLAGS="-f /etc/bluetooth/hcid.conf"
-
- if is_yes "${SDPD_ENABLE}" ; then
- HCID_FLAGS="$HCID_FLAGS -s"
- fi
- msg_starting hcid
- daemon /usr/sbin/hcid $HCID_FLAGS
- RETVAL=$?
- fi
-
- if is_yes "${HIDD_ENABLE}" && [ -x /usr/bin/hidd ]; then
- msg_starting hidd
- daemon /usr/bin/hidd ${HIDD_OPTIONS} --server
- RETVAL=$?
- fi
-
- if is_yes "${RFCOMM_ENABLE}" && [ -x /usr/bin/rfcomm ]; then
- msg_starting rfcomm
- daemon /usr/bin/rfcomm -f /etc/bluetooth/rfcomm.conf bind all
- RETVAL=$?
- fi
-
- if is_yes "${DUND_ENABLE}" && [ -x /usr/bin/dund ]; then
- msg_starting dund
- daemon /usr/bin/dund ${DUND_OPTIONS}
- RETVAL=$?
- fi
-
- if is_yes "${PAND_ENABLE}" && [ -x /usr/bin/pand ]; then
- msg_starting pand
- daemon /usr/bin/pand ${PAND_OPTIONS}
- RETVAL=$?
- fi
-
- if [ -f /usr/sbin/hciattach -a "$UART_CONF" != "no" ]; then
- grep -v '^#' $UART_CONF | while read i; do
- /usr/sbin/hciattach $i
- done
- fi
- touch /var/lock/subsys/bluetooth
- else