op_createsd.sh: New script to prepare SD Cards for the Pandora
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_bluetooth.sh
index 2d5b79a..b63fe76 100644 (file)
@@ -16,13 +16,14 @@ else
        then
                notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i blueman -t 5000
                sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
+               sudo /usr/pandora/scripts/op_bluetooth_work.sh 0
                rm -f "$LOCK"
        else
-            kernel_major=`uname -r | cut -c 1`
-            if [ "$kernel_major" = "3" ]; then
-               zenity --info --title="Bluetooth not supported" --text "Sorry, the experimental kernel does not support Bluetooth (yet).\n\nIt could not be enabled."
-             exit 1
-            else
+               if ! sudo /usr/pandora/scripts/op_bluetooth_work.sh 1; then
+                       notify-send -u normal "Bluetooth" "Bluetooth error" -i blueman -t 3000
+                       exit 1
+               fi
+
                pgrep bluetoothd
                echo $INTERFACE
                 if [ $? -ne 1 ]; then
@@ -31,8 +32,6 @@ else
                        sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
                        sudo /usr/sbin/bluetoothd 1>/dev/null
                        touch "$LOCK"
-
                fi
        fi
-    fi
 fi