From fd80c3bfb690536d2e343540f9a07963fdba356c Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Mon, 24 Oct 2016 18:20:08 +0300 Subject: [PATCH] Check for BT tools in brcm startup scripts Closes #449 --- scripts/brcm40183-patch | 5 ++++- scripts/brcm4330-patch | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/brcm40183-patch b/scripts/brcm40183-patch index e3c782954c..3fce03652d 100644 --- a/scripts/brcm40183-patch +++ b/scripts/brcm40183-patch @@ -3,7 +3,7 @@ # Provides: brcm40183-patch # Required-Start: $local_fs # Required-Stop: -# X-Start-Before: bluetooth +# X-Start-Before: bluetooth # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Patch firmware for brcm40183 Bluetooth adapter @@ -18,6 +18,9 @@ then . "${DEFAULTS}" fi +# exit if bluetooth utils are not installed +[ -f "/bin/hciconfig" ] || exit 0 + . /lib/lsb/init-functions do_start () { diff --git a/scripts/brcm4330-patch b/scripts/brcm4330-patch index aa232a164d..1ba4c2a4be 100644 --- a/scripts/brcm4330-patch +++ b/scripts/brcm4330-patch @@ -3,7 +3,7 @@ # Provides: brcm4330-patch # Required-Start: $local_fs # Required-Stop: -# X-Start-Before: bluetooth +# X-Start-Before: bluetooth # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Patch firmware for brcm4330 Bluetooth adapter @@ -20,6 +20,9 @@ fi . /lib/lsb/init-functions +# exit if bluetooth utils are not installed +[ -f "/bin/hciconfig" ] || exit 0 + do_start () { if [ ! -z $(hciconfig | /bin/grep UART | /usr/bin/cut -d: -f1) ]