diff --git a/modules.d/62bluetooth/module-setup.sh b/modules.d/62bluetooth/module-setup.sh index 8be3183645..8bef9272c1 100755 --- a/modules.d/62bluetooth/module-setup.sh +++ b/modules.d/62bluetooth/module-setup.sh @@ -8,11 +8,12 @@ check() { require_any_binary /usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd || return 1 if [[ $hostonly ]]; then - # Warn user if a Peripheral (0x500) is found of minor class: + # Warn user if bluetooth kernel module is loaded + # and if Peripheral (0x500) is found of minor class: # * Keyboard (0x40) # * Keyboard/pointing (0xC0) # 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 \ + [ -d "/sys/class/bluetooth" ] && 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