From 74393f0cae4524bfc7f46082f4e6a4a619c5cf5a Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Tue, 29 Jun 2010 03:54:44 +0200 Subject: [PATCH] op_bluetooth: Fixed state-restoring on startup --- recipes/pandora-system/pandora-scripts/op_bluetooth.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts/op_bluetooth.sh b/recipes/pandora-system/pandora-scripts/op_bluetooth.sh index cf33851..93615ff 100644 --- a/recipes/pandora-system/pandora-scripts/op_bluetooth.sh +++ b/recipes/pandora-system/pandora-scripts/op_bluetooth.sh @@ -3,9 +3,10 @@ # Released under the GPL INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`" -LOCK="~/.op_btenabled" +LOCK=".op_btenabled" +cd "$HOME" -if [ $1 = "startup" ]; then +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." else -- 2.39.5