diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-06-30 07:30:16 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-06-30 07:30:16 -0700 |
commit | 0b86874a83da4eab9ddf4b038913f301539be674 (patch) | |
tree | 64ca40c9e67d5f2311a0d3c195ce744bcf2a9251 /scripts | |
parent | 3d1e39f33bb0f66e28c4ef7a2f770a76e1291315 (diff) | |
download | bluez-0b86874a83da4eab9ddf4b038913f301539be674.tar.gz |
Use a udev rule to start bluetoothd on demand
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 24 | ||||
-rw-r--r-- | scripts/bluetooth.rules | 3 |
2 files changed, 11 insertions, 16 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 494a9c2d4..df950f8ef 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -8,30 +8,22 @@ if HID2HCI rules_DATA += bluetooth-hid2hci.rules endif -if PCMCIARULES +if PCMCIA rules_DATA += bluetooth-serial.rules endif + +if UDEVRULES +rules_DATA += bluetooth.rules +endif endif -if PCMCIARULES +if PCMCIA udevdir = $(libexecdir)/udev udev_SCRIPTS = bluetooth_serial endif -EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \ - bluetooth-serial.rules bluetooth_serial +EXTRA_DIST = bluetooth.init bluetooth.default bluetooth.rules \ + bluetooth-hid2hci.rules bluetooth-serial.rules bluetooth_serial MAINTAINERCLEANFILES = Makefile.in - -if INITSCRIPTS -install-data-local: - $(INSTALL) -D -m 755 $(srcdir)/bluetooth.init $(DESTDIR)$(sysconfdir)/init.d/bluetooth - $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/default - [ -f $(DESTDIR)$(sysconfdir)/default/bluetooth ] || \ - $(INSTALL_DATA) $(srcdir)/bluetooth.default $(DESTDIR)$(sysconfdir)/default/bluetooth - -uninstall-local: - @rm -f $(DESTDIR)$(sysconfdir)/init.d/bluetooth - @rm -f $(DESTDIR)$(sysconfdir)/default/bluetooth -endif diff --git a/scripts/bluetooth.rules b/scripts/bluetooth.rules new file mode 100644 index 000000000..2a836050e --- /dev/null +++ b/scripts/bluetooth.rules @@ -0,0 +1,3 @@ +# Run helper every time a Bluetooth device appears +# On remove actions, bluetoothd should go away by itself +ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/bluetoothd --udev" |