Author: arekm                        Date: Sat Aug  8 11:33:28 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use udev for starting stuff

---- Files affected:
packages/bluez:
   bluez.init (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: packages/bluez/bluez.init
diff -u packages/bluez/bluez.init:1.5 packages/bluez/bluez.init:1.6
--- packages/bluez/bluez.init:1.5       Tue Aug  4 21:13:20 2009
+++ packages/bluez/bluez.init   Sat Aug  8 13:33:22 2009
@@ -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
 #
@@ -17,11 +17,12 @@
 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 @@
 
 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
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bluez/bluez.init?r1=1.5&r2=1.6&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to