]> git.pld-linux.org Git - packages/bluez.git/commitdiff
- use udev for starting stuff
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 8 Aug 2009 11:33:22 +0000 (11:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bluez.init -> 1.6

bluez.init

index 7fdee4929b09572c62964defbe053ce0afc5ce07..23292810e4c50787748d563a02019de24baa8988 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# bluetooth    Bluetooth subsystem starting and stopping
+# bluetooth    Bluetooth subsystem starting and stopping. Turn HID adapters into Bluetooth ones.
 #
 # chkconfig:   345 50 83
 #
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/bluetooth ]; then
-               msg_starting hid2hci
-               daemon /usr/sbin/hid2hci -q -r hci
-               RETVAL=$?
-               /bin/sleep 1 # delay for hid's to be detected by hotplug
-               touch /var/lock/subsys/bluetooth
+               if [ -x /sbin/udevadm ]; then
+                       msg_starting "Bluetooth devices"
+                       daemon /sbin/udevadm trigger --subsystem-match=bluetooth
+                       RETVAL=$?
+                       touch /var/lock/subsys/bluetooth
+               fi
        else
                msg_already_running bluetooth
        fi
@@ -29,8 +30,7 @@ start() {
 
 stop() {
        if [ -f /var/lock/subsys/bluetooth ]; then
-               msg_stopping hid2hci
-               daemon /usr/sbin/hid2hci -q -r hid
+               # nothing needed to stop it
                rm -f /var/lock/subsys/bluetooth
        else
                msg_not_running bluetooth
This page took 0.0359 seconds and 4 git commands to generate.