3 # Released under the GPL
5 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
9 if [ "$1" = "startup" ]; then
10 if [ -f "$LOCK" ]; then
11 sudo /usr/pandora/scripts/op_bluetooth_work.sh 1
12 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
13 sudo /usr/sbin/hciconfig "$INTERFACE" up pscan 1>/dev/null && sudo /usr/sbin/bluetoothd
15 echo "Bluetooth: User has not enabled Bluetooth."
18 # Figure out if Bluetooth is running or not
20 if hciconfig "$INTERFACE" | grep UP &>/dev/null
22 notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i blueman -t 5000
23 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
24 sudo /usr/pandora/scripts/op_bluetooth_work.sh 0
27 if ! sudo /usr/pandora/scripts/op_bluetooth_work.sh 1; then
28 notify-send -u normal "Bluetooth" "Bluetooth error" -i blueman -t 3000
35 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i blueman -t 5000
36 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
37 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
38 sudo /usr/sbin/bluetoothd 1>/dev/null