From e6059fac9fd5df091ef85fa0b380af59f49d9400 Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Sat, 24 Nov 2012 21:54:16 +0200 Subject: [PATCH] op_bluetooth: restore enabled state --- recipes/pandora-system/pandora-scripts/op_bluetooth.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts/op_bluetooth.sh b/recipes/pandora-system/pandora-scripts/op_bluetooth.sh index b63fe76..fa47d05 100644 --- a/recipes/pandora-system/pandora-scripts/op_bluetooth.sh +++ b/recipes/pandora-system/pandora-scripts/op_bluetooth.sh @@ -7,8 +7,13 @@ LOCK=".op_btenabled" cd "$HOME" if [ "$1" = "startup" ]; then - [ -f "$LOCK" ] && sudo /usr/sbin/hciconfig "$INTERFACE" up pscan 1>/dev/null && sudo /usr/sbin/bluetoothd || echo "Bluetooth: User has not enabled Bluetooth." - + if [ -f "$LOCK" ]; then + sudo /usr/pandora/scripts/op_bluetooth_work.sh 1 + INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`" + sudo /usr/sbin/hciconfig "$INTERFACE" up pscan 1>/dev/null && sudo /usr/sbin/bluetoothd + else + echo "Bluetooth: User has not enabled Bluetooth." + fi else # Figure out if Bluetooth is running or not -- 2.39.2