Skip to contentSkip to conversation

Add udev rules to start bluetooth on-demand

PATCH In review Bastien Nocera 2 participants 12 messages Jun 21, 2009 – Jun 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add udev rules to start bluetooth on-demand

As discussed in previous mails.

Cheers

Quoted 1 line

From 830639ae0f3421a9d7c7366854925e32001771b5 Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Sun, 21 Jun 2009 14:37:32 +0100
Subject: [PATCH] Add udev rules to start bluetooth on-demand

Those rules call bluetoothd --udev when a new dongle is inserted.

---
 scripts/96-bluez.rules |    5 +++++
 scripts/Makefile.am    |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
 create mode 100644 scripts/96-bluez.rules
scripts/96-bluez.rules new file +5 -0
new file mode 100644
index 0000000..f3034b5
@@ -0,0 +1,5 @@
+# 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"
+
scripts/Makefile.am +2 -0
index 494a9c2..d87295d 100644
@@ -11,6 +11,8 @@ endif
 if PCMCIARULES
 rules_DATA += bluetooth-serial.rules
 endif
+
+rules_DATA += 96-bluez.rules
 endif
 
 if PCMCIARULES
Signature · 1 line
1.6.2.2
maintainer
#1 lore raw

Hi Bastien,

Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Regards

Marcel

#2 lore raw
Quoted 10 lines · Marcel Holtmann

Hi Bastien,

Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

Quoted 1 line

From f723fb9f588a987bfaba94cfb2c1acb6c89c926c Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Sun, 21 Jun 2009 14:37:32 +0100
Subject: [PATCH] Add udev rules to start bluetooth on-demand

Those rules call bluetoothd --udev when a new dongle is inserted.

---
 scripts/Makefile.am     |    4 +++-
 scripts/bluetooth.rules |    5 +++++
 2 files changed, 8 insertions(+), 1 deletions(-)
 create mode 100644 scripts/bluetooth.rules
scripts/Makefile.am +3 -1
index 494a9c2..d06f95e 100644
@@ -11,6 +11,8 @@ endif
 if PCMCIARULES
 rules_DATA += bluetooth-serial.rules
 endif
+
+rules_DATA += bluetooth.rules
 endif
 
 if PCMCIARULES
@@ -20,7 +22,7 @@ udev_SCRIPTS = bluetooth_serial
 endif
 
 EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \
-				bluetooth-serial.rules bluetooth_serial
+				bluetooth-serial.rules bluetooth_serial bluetooth.rules
 
 MAINTAINERCLEANFILES = Makefile.in
 
scripts/bluetooth.rules new file +5 -0
new file mode 100644
index 0000000..f3034b5
@@ -0,0 +1,5 @@
+# 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"
+
Signature · 1 line
1.6.2.2
maintainer
#3 lore raw

Hi Bastien,

Quoted 10 lines
Quoted 8 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Regards

Marcel

#4 lore raw
Quoted 7 lines · Marcel Holtmann

Hi Bastien,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

Quoted 1 line

From 0024e48166073f05ae233113eee2119ccd2e3f71 Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Sun, 21 Jun 2009 14:37:32 +0100
Subject: [PATCH] Add udev rules to start bluetooth on-demand

Those rules call bluetoothd --udev when a new dongle is inserted.

---
 scripts/Makefile.am     |    6 +++++-
 scripts/bluetooth.rules |    5 +++++
 2 files changed, 10 insertions(+), 1 deletions(-)
 create mode 100644 scripts/bluetooth.rules
scripts/Makefile.am +5 -1
index 494a9c2..e5683b2 100644
@@ -11,6 +11,10 @@ endif
 if PCMCIARULES
 rules_DATA += bluetooth-serial.rules
 endif
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif
 
 if PCMCIARULES
@@ -20,7 +24,7 @@ udev_SCRIPTS = bluetooth_serial
 endif
 
 EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \
-				bluetooth-serial.rules bluetooth_serial
+				bluetooth-serial.rules bluetooth_serial bluetooth.rules
 
 MAINTAINERCLEANFILES = Makefile.in
 
scripts/bluetooth.rules new file +5 -0
new file mode 100644
index 0000000..f3034b5
@@ -0,0 +1,5 @@
+# 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"
+
Signature · 1 line
1.6.2.2
maintainer
#5 lore raw
Quoted 12 lines · Bastien Nocera
Quoted 11 lines · Marcel Holtmann

Hi Bastien,

Quoted 9 lines
Quoted 8 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
endif

???

Regards

Marcel

#6 lore raw
Quoted 20 lines · Marcel Holtmann
Quoted 18 lines · Bastien Nocera
Quoted 7 lines · Marcel Holtmann

Hi Bastien,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

scripts/Makefile.am endif · line 18

Quoted 5 lines
scripts/Makefile.am +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

maintainer
#7 lore raw

Hi Bastien,

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

Quoted 8 lines

scripts/Makefile.am endif · line 18

Quoted 5 lines
scripts/Makefile.am +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

then if !INITSCRIPTS should do it. However I was more asking about the spelling mistake. You forgot a T ;)

Regards

Marcel

#8 lore raw
Quoted 27 lines · Marcel Holtmann

Hi Bastien,

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

Quoted 8 lines

scripts/Makefile.am endif · line 18

Quoted 5 lines
scripts/Makefile.am +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

Quoted 2 lines

then if !INITSCRIPTS should do it. However I was more asking about the spelling mistake. You forgot a T ;)

Well, that's embarrassing...

maintainer
#9 lore raw

Hi Bastien,

Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

scripts/Makefile.am endif · line 18

Quoted 5 lines
scripts/Makefile.am +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

Quoted 4 lines
Quoted 2 lines

then if !INITSCRIPTS should do it. However I was more asking about the spelling mistake. You forgot a T ;)

Well, that's embarrassing...

are you sending a new patch :)

Regards

Marcel

#10 lore raw
Quoted 27 lines · Marcel Holtmann

Hi Bastien,

Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

Review

Quoted 5 lines
(quoted diff) +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

then if !INITSCRIPTS should do it. However I was more asking about the spelling mistake. You forgot a T ;)

Well, that's embarrassing...

are you sending a new patch :)

Thought you'd fix the typo, and commit.

Patch attached.

Quoted 1 line

From 9602419da57953b91e4fcb7a6e3770744154dbef Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Mon, 29 Jun 2009 15:54:46 +0100
Subject: [PATCH] Add udev rules to start bluetooth on-demand

Those rules call bluetoothd --udev when a new dongle is inserted.

---
 scripts/Makefile.am |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
scripts/Makefile.am +10 -1
index 494a9c2..d97b309 100644
@@ -11,6 +11,10 @@ endif
 if PCMCIARULES
 rules_DATA += bluetooth-serial.rules
 endif
+
+if INITSCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif
 
 if PCMCIARULES
@@ -19,8 +23,13 @@ udevdir = $(libexecdir)/udev
 udev_SCRIPTS = bluetooth_serial
 endif
 
+if INITSCRIPTS
+else
+rules_DATA += bluetooth.rules
+endif
+
 EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \
-				bluetooth-serial.rules bluetooth_serial
+				bluetooth-serial.rules bluetooth_serial bluetooth.rules
 
 MAINTAINERCLEANFILES = Makefile.in
 
Signature · 1 line
1.6.2.2
maintainer
#11 lore raw

Hi Bastien,

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

As discussed in previous mails.

please name it bluetooth.rules. The daemon is also called bluetoothd and not bluezd.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also you need to have the EXTRA_DIST part in it since _DATA doesn't get added to the distribution automatically. For all this changes, you have to check with make distcheck.

Fixed version attached

we might need to put this into ifndef INITSCRIPTS since it makes no sense to install the init script and the udev rule at the same time.

Revised patch attached

scripts/Makefile.am endif · line 18

Quoted 5 lines
scripts/Makefile.am +4 -0
+
+if INISCRIPTS
+else
+rules_DATA += bluetooth.rules
 endif

ifndef isn't an automake construct.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

then if !INITSCRIPTS should do it. However I was more asking about the spelling mistake. You forgot a T ;)

Well, that's embarrassing...

are you sending a new patch :)

Thought you'd fix the typo, and commit.

not if you wanna keep your author name on the patch.

Also does if !INITSCRIPTS not work?

And why does your patch now has two statements for rules_DATA?

Regards

Marcel