From 797e3b4e5f5345faa7e23dbb7d2416979d55759e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 5 Aug 2009 10:08:53 +0000 Subject: [PATCH] - Remove hid2hci calls, they're in udev now - Work-around udev bug, bluetoothd wasn't getting enabled on coldplug --- bluetooth.conf | 7 ------- bluetooth.init | 22 ++++++++-------------- bluez.spec | 11 +++++++---- 3 files changed, 15 insertions(+), 25 deletions(-) delete mode 100644 bluetooth.conf diff --git a/bluetooth.conf b/bluetooth.conf deleted file mode 100644 index b29fc98..0000000 --- a/bluetooth.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Enable this to use hid2hci to switch a Bluetooth device in USB HID mode -# to HCI mode for Bluetooth operation. -#HID2HCI_ENABLE=true - -# Enable this to switch capable devices back to HID mode on Bluetooth shutdown -#HID2HCI_UNDO=true - diff --git a/bluetooth.init b/bluetooth.init index fc44e4f..090cb8c 100644 --- a/bluetooth.init +++ b/bluetooth.init @@ -4,8 +4,8 @@ # description: Turn HID adapters into Bluetooth ones # ### BEGIN INIT INFO -# Short-Description: Turn HID adapters into Bluetooth ones -# Description: Turn HID adapters into Bluetooth ones +# Short-Description: Trigger bluetoothd start-up +# Description: Trigger bluetoothd start-up ### END INIT INFO # Source function library. @@ -15,21 +15,18 @@ start() { - echo -n $"Starting hid2hci:" - [ "$HID2HCI_ENABLE" = "true" ] && hid2hci --tohci > /dev/null 2>&1 || : - RETVAL=$? - touch /var/lock/subsys/bluetooth + echo -n $"Enabling Bluetooth devices:" + udevadm trigger --subsystem-match=bluetooth echo "" - return $RETVAL + return 0 } stop() { + # FIXME If somebody figures out how to disable the K* script echo -n "Stopping Bluetooth services:" - [ "$HID2HCI_UNDO" = "true" ] && hid2hci --tohid > /dev/null 2>&1 || : - RETVAL=$? echo "" - return $RETVAL + return 0 } case "$1" in @@ -39,11 +36,8 @@ case "$1" in stop) stop ;; - status) - RETVAL=0 - ;; *) - echo $"Usage: $0 {start|stop|status}" + echo $"Usage: $0 {start|stop}" exit 3 ;; esac diff --git a/bluez.spec b/bluez.spec index 1eaae94..1fc061f 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,12 +1,11 @@ Summary: Bluetooth utilities Name: bluez Version: 4.47 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz Source1: bluetooth.init -Source2: bluetooth.conf Source3: dund.init Source4: dund.conf Source5: pand.init @@ -134,7 +133,7 @@ This includes hidd, dund and pand. %build libtoolize -f -c autoreconf -%configure --enable-cups --enable-hid2hci --enable-dfutool --enable-tools --enable-bccmd --enable-gstreamer --enable-hidd --enable-pand --enable-dund +%configure --enable-cups --enable-dfutool --enable-tools --enable-bccmd --enable-gstreamer --enable-hidd --enable-pand --enable-dund make %install @@ -223,7 +222,6 @@ fi %{_mandir}/man8/* %dir %{_sysconfdir}/bluetooth/ %config(noreplace) %{_sysconfdir}/bluetooth/* -%config(noreplace) %{_sysconfdir}/sysconfig/bluetooth %config(noreplace) %{_sysconfdir}/sysconfig/modules/bluez-uinput.modules %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf %{_libdir}/bluetooth/ @@ -270,6 +268,11 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/pand %changelog +* Wed Aug 05 2009 Bastien Nocera 4.47-2 +- Remove hid2hci calls, they're in udev now +- Work-around udev bug, bluetoothd wasn't getting enabled + on coldplug + * Sun Aug 02 2009 Bastien Nocera 4.47-1 - Update to 4.47