]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(bluetooth): warn user instead of including it by default
authorHenrik Gombos <henrik99999@gmail.com>
Sat, 17 Jun 2023 18:15:03 +0000 (18:15 +0000)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 22 Jun 2023 17:31:01 +0000 (10:31 -0700)
Bluetooth module can result in a known race condition at boot.
Discourage its usage by default.

modules.d/62bluetooth/module-setup.sh

index 596f0ee3a43c89c83af288a59645bd8b8e94893d..460a057cde73bad286e2a0637783a04070c3d7f8 100755 (executable)
@@ -8,10 +8,11 @@ check() {
     require_any_binary /usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd || return 1
 
     if [[ $hostonly ]]; then
-        # Include by default if a Peripheral (0x500) is found of minor class:
+        # 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 && return 0
+        grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null \
+            && dwarn "If you need to use bluetooth, please include it explicitly."
     fi
 
     return 255