diff options
Diffstat (limited to 'patches/source/bluez/config')
-rw-r--r-- | patches/source/bluez/config/bluetooth.modprobe | 3 | ||||
-rw-r--r-- | patches/source/bluez/config/bluetooth.sh | 7 | ||||
-rw-r--r-- | patches/source/bluez/config/rc.bluetooth | 29 |
3 files changed, 39 insertions, 0 deletions
diff --git a/patches/source/bluez/config/bluetooth.modprobe b/patches/source/bluez/config/bluetooth.modprobe new file mode 100644 index 000000000..3072d7885 --- /dev/null +++ b/patches/source/bluez/config/bluetooth.modprobe @@ -0,0 +1,3 @@ +# use "reset=1" as default, since it should be safe for recent devices and +# solves all kind of problems. +options btusb reset=1 diff --git a/patches/source/bluez/config/bluetooth.sh b/patches/source/bluez/config/bluetooth.sh new file mode 100644 index 000000000..22034551c --- /dev/null +++ b/patches/source/bluez/config/bluetooth.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check whether /etc/rc.d/rc.bluetooth is executable before starting +# the bluetooth subsystem for hotplugged bluetooth devices +[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev +exit 0 + diff --git a/patches/source/bluez/config/rc.bluetooth b/patches/source/bluez/config/rc.bluetooth new file mode 100644 index 000000000..296c45422 --- /dev/null +++ b/patches/source/bluez/config/rc.bluetooth @@ -0,0 +1,29 @@ +#!/bin/sh + +bluez_start() { + /usr/sbin/bluetoothd +} + +bluez_stop() { + udevadm trigger --subsystem-match=bluetooth --action=remove + pkill -TERM bluetoothd 1>/dev/null 2>/dev/null +} + +case "$1" in + start) + bluez_start + ;; + stop) + bluez_stop + ;; + restart) + bluez_stop + sleep 1 + bluez_start + ;; + *) + printf "Usage: $N {start|stop|restart}\n" + exit 1 + ;; +esac + |