packages: bluez/bluez.init - use udev for starting stuff
Arkadiusz Miskiewicz
arekm at maven.pl
Sat Aug 8 14:23:18 CEST 2009
On Saturday 08 of August 2009, Fryderyk Dziarmagowski wrote:
> On Sat, 08 Aug 2009 13:33:28 +0200
>
> arekm <arekm at pld-linux.org> wrote:
> > 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
>
> this is redundant. if there is a bluetooth subsystem present, all
> events are already triggered by start_udev.
This is workaround for some bug in udev. FC has the details.
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
More information about the pld-devel-en
mailing list