UART_CONF="no"
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/bluetooth ]; then
msg_starting bluetooth; started
else
msg_already_running bluetooth
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/bluetooth ]; then
if is_yes "${PAND_ENABLE}" && [ -x /usr/bin/pand ]; then
msg_stopping pand
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
else
msg_not_running bluetooth
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
reload|force-reload)
if [ -f /var/lock/subsys/bluetooth ]; then
killproc hcid -HUP
RETVAL=$?
else
- msg_not_running bluetooth >&2
+ msg_not_running bluetooth
exit 7
fi
;;
esac
exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4