Skip to content

Commit dfa408c

Browse files
LaszloGombosaafeijoo-suse
authored andcommitted
fix(bluetooth): make bluetooth rules more strict
Only warn if bluetooth kernel module is loaded at the time of initrd generation in hostonly mode.
1 parent e84d65c commit dfa408c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ check() {
88
require_any_binary /usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd || return 1
99

1010
if [[ $hostonly ]]; then
11-
# Warn user if a Peripheral (0x500) is found of minor class:
11+
# Warn user if bluetooth kernel module is loaded
12+
# and if Peripheral (0x500) is found of minor class:
1213
# * Keyboard (0x40)
1314
# * Keyboard/pointing (0xC0)
1415
# and if Appearance is set to the value defined for keyboard (0x03C1)
15-
grep -qiE -e 'Class=0x[0-9a-f]{3}5[4c]0' -e 'Appearance=0x03c1' /var/lib/bluetooth/*/*/info 2> /dev/null \
16+
[ -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 \
1617
&& dwarn "If you need to use bluetooth, please include it explicitly."
1718
fi
1819

0 commit comments

Comments
 (0)