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 -f /etc/bluetooth/hcid.conf
- RETVAL=$?
- fi
-
- if is_yes "${SDPD_ENABLE}" && [ -x /usr/sbin/sdpd ]; then
- msg_starting sdpd
- daemon /usr/sbin/sdpd
+ daemon /usr/sbin/hcid $HCID_FLAGS
RETVAL=$?
fi
/usr/sbin/hciattach $i
done
fi
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bluetooth
+ touch /var/lock/subsys/bluetooth
else
msg_already_running bluetooth
fi
killproc /usr/bin/hidd
fi
- if is_yes "${SDPD_ENABLE}" && [ -x /usr/sbin/sdpd ]; then
- msg_stopping sdpd
- killproc /usr/sbin/sdpd
- fi
-
if is_yes "${HCID_ENABLE}" && [ -x /usr/sbin/hcid ]; then
msg_stopping hcid
- daemon /usr/sbin/hcid
+ killproc /usr/sbin/hcid
fi
if [ "$UART_CONF" != "no" ]; then
is_yes "${SDPD_ENABLE}" && status sdpd
is_yes "${HIDD_ENABLE}" && status hidd
is_yes "${DUND_ENABLE}" && status dund
- exit $?
+ if [ -f /var/lock/subsys/bluetooth ]; then
+ exit 0
+ else
+ exit 1
+ fi
;;
*)
msg_usage "$0 {start|stop|restart|reload|force-reload|status}"