From: Antonio Alvarez Feijoo Date: Tue, 9 May 2023 12:24:57 +0000 (+0200) Subject: fix(bluetooth): include it if Appearance matches the value assigned for keyboard X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8079ceafcac910d0c061830769866710c3e889a8;p=thirdparty%2Fdracut.git fix(bluetooth): include it if Appearance matches the value assigned for keyboard Following the Bluetooth spec [1], Assigned Numbers Document, Rev. 2023-05-04, Section 2.6.3, Appearance Sub-category, the Appearance value defined for keyboards is 0x03C1. This value must be checked to include the bluetooth module in hostonly mode, because some Bluetooth keyboards do not set the Class attribute. [1] https://www.bluetooth.com/specifications/assigned-numbers/ --- diff --git a/modules.d/62bluetooth/module-setup.sh b/modules.d/62bluetooth/module-setup.sh index 460a057cd..d7b3046f6 100755 --- a/modules.d/62bluetooth/module-setup.sh +++ b/modules.d/62bluetooth/module-setup.sh @@ -11,7 +11,8 @@ check() { # Warn user if a Peripheral (0x500) is found of minor class: # * Keyboard (0x40) # * Keyboard/pointing (0xC0) - grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null \ + # and if Appearance is set to the value defined for keyboard (0x03C1) + grep -qiE -e 'Class=0x[0-9a-f]{3}5[4c]0' -e 'Appearance=0x03c1' /var/lib/bluetooth/*/*/info 2> /dev/null \ && dwarn "If you need to use bluetooth, please include it explicitly." fi