3 # Released under the GPL
5 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
9 if [ "$1" = "startup" ]; then
10 [ -f "$LOCK" ] && sudo /usr/sbin/hciconfig "$INTERFACE" up pscan 1>/dev/null && sudo /usr/sbin/bluetoothd || echo "Bluetooth: User has not enabled Bluetooth."
13 # Figure out if Bluetooth is running or not
15 if hciconfig "$INTERFACE" | grep UP &>/dev/null
17 notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i blueman -t 5000
18 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
21 kernel_major=`uname -r | cut -c 1`
22 if [ "$kernel_major" = "3" ]; then
23 zenity --info --title="Bluetooth not supported" --text "Sorry, the experimental kernel does not support Bluetooth (yet).\n\nIt could not be enabled."
29 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i blueman -t 5000
30 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
31 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
32 sudo /usr/sbin/bluetoothd 1>/dev/null