summaryrefslogtreecommitdiffstats
path: root/scripts/bluetooth.rc.deb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bluetooth.rc.deb')
-rwxr-xr-xscripts/bluetooth.rc.deb86
1 files changed, 0 insertions, 86 deletions
diff --git a/scripts/bluetooth.rc.deb b/scripts/bluetooth.rc.deb
deleted file mode 100755
index 4c216c31..00000000
--- a/scripts/bluetooth.rc.deb
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /bin/sh
-#
-# bluetooth Bluetooth subsystem starting and stopping
-#
-
-NAME=bluetooth
-DESC="Bluetooth subsystem"
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-HCID=/usr/sbin/hcid
-HCID_CONF=/etc/bluetooth/hcid.conf
-HCIATTACH=/usr/sbin/hciattach
-UART_CONF=/etc/bluetooth/uart
-SDPD=/usr/sbin/sdpd
-RFCOMM=/usr/bin/rfcomm
-RFCOMM_CONF=/etc/bluetooth/rfcomm.conf
-
-set -e
-
-start_uarts()
-{
- [ -x $HCIATTACH -a -f $UART_CONF ] || return
- grep -v '^#' $UART_CONF | while read i; do
- $HCIATTACH $i
- done
-}
-
-stop_uarts()
-{
- killall $HCIATTACH > /dev/null 2>&1 || true
-}
-
-case "$1" in
- start)
- echo -n "Starting $DESC:"
- if [ -x $HCID -a -f $HCID_CONF ] ; then
- $HCID -f $HCID_CONF
- echo -n " hcid"
- fi
- if [ -x $SDPD ] ; then
- $SDPD
- echo -n " sdpd"
- fi
- if [ -x $RFCOMM -a -f $RFCOMM_CONF ] ; then
- $RFCOMM -f $RFCOMM_CONF bind all
- echo -n " rfcomm"
- fi
- echo "."
- start_uarts || true
- ;;
- stop)
- echo -n "Stopping $DESC:"
- if [ -x $RFCOMM ] ; then
- echo -n " rfcomm"
- $RFCOMM release all
- fi
- echo -n " sdpd"
- killall $SDPD > /dev/null 2>&1 || true
- echo -n " hcid"
- killall $HCID > /dev/null 2>&1 || true
- echo "."
- stop_uarts
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC:"
- echo -n " hcid"
- killall $HCID > /dev/null 2>&1 || true
- sleep 1
- if [ -x $HCID -a -f $HCID_CONF ] ; then
- $HCID -f $HCID_CONF
- fi
- echo -n " sdpd"
- killall $SDPD > /dev/null 2>&1 || true
- sleep 1
- if [ -x $SDPD ] ; then
- $SDPD
- fi
- echo "."
- ;;
- *)
- N=/etc/init.d/bluetooth
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0