Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2023 07:54:24 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9150a0455e43 - main - devd: Move bluetooth part in devd/bluetooth.conf
Message-ID:  <202302080754.3187sOvl038246@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=9150a0455e435e11d27b9b3f89a30cb2f04fe59e

commit 9150a0455e435e11d27b9b3f89a30cb2f04fe59e
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-02-01 07:44:46 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-02-08 07:51:34 +0000

    devd: Move bluetooth part in devd/bluetooth.conf
    
    And make it part of the FreeBSD-bluetooth package.
    This avoid calling service bluetooth on an installation without it
    installed.
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D38323
---
 sbin/devd/Makefile       |  7 +++++++
 sbin/devd/bluetooth.conf |  9 +++++++++
 sbin/devd/devd.conf      | 10 ----------
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index c9d2470f30b5..5b2feb6c2bdb 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -17,6 +17,13 @@ DHCLIENTDIR=		${DEVDDIR}
 DHCLIENT+=		dhclient.conf
 DHCLIENTPACKAGE=	dhclient
 
+.if ${MK_BLUETOOTH} != "no"
+CONFGROUPS+=		BLUETOOTH
+BLUETOOTHDIR=		${DEVDDIR}
+BLUETOOTH+=		bluetooth.conf
+BLUETOOTHPACKAGE=	bluetooth
+.endif
+
 .if ${MK_HYPERV} != "no"
 CONFGROUPS+=	HYPERV
 HYPERVDIR=${DEVDDIR}
diff --git a/sbin/devd/bluetooth.conf b/sbin/devd/bluetooth.conf
new file mode 100644
index 000000000000..29bd51e36fca
--- /dev/null
+++ b/sbin/devd/bluetooth.conf
@@ -0,0 +1,9 @@
+# When a USB Bluetooth dongle appears, activate it
+attach 100 {
+	device-name "ubt[0-9]+";
+	action "service bluetooth quietstart $device-name";
+};
+detach 100 {
+	device-name "ubt[0-9]+";
+	action "service bluetooth quietstop $device-name";
+};
diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf
index f7a8ea7ac8aa..43596fb9a9d5 100644
--- a/sbin/devd/devd.conf
+++ b/sbin/devd/devd.conf
@@ -69,16 +69,6 @@ detach 100 {
 	device-name "ed50";
 };
 
-# When a USB Bluetooth dongle appears, activate it
-attach 100 {
-	device-name "ubt[0-9]+";
-	action "service bluetooth quietstart $device-name";
-};
-detach 100 {
-	device-name "ubt[0-9]+";
-	action "service bluetooth quietstop $device-name";
-};
-
 # Firmware downloader for Atheros AR3011 based USB Bluetooth devices
 #attach 100 {
 #	match "vendor" "0x0cf3";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302080754.3187sOvl038246>