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
This commit is contained in:
Emmanuel Vadot 2023-02-01 08:44:46 +01:00
parent f4d9116de1
commit 9150a0455e
3 changed files with 16 additions and 10 deletions

View File

@ -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}

9
sbin/devd/bluetooth.conf Normal file
View File

@ -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";
};

View File

@ -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";