From: Michael Mrozek Date: Tue, 29 Jun 2010 01:54:44 +0000 (+0200) Subject: op_bluetooth: Fixed state-restoring on startup X-Git-Tag: sz_beta3~235^2~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74393f0cae4524bfc7f46082f4e6a4a619c5cf5a;p=openpandora.oe.git op_bluetooth: Fixed state-restoring on startup --- 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