Fix kernel panick when turning off bluetooth

This commit is contained in:
Sam A. 2023-02-04 20:13:30 +01:00
parent 6aa3ee0a29
commit ff585c576d
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -3,12 +3,12 @@ bt() {
if [[ $1 == on ]]; then
(( ${+commands[connmanctl]} )) &&
connmanctl enable bluetooth ||
connmanctl enable bluetooth && sleep 0.5
bluetoothctl power on
elif [[ $1 == off ]]; then
(( ${+commands[connmanctl]} )) &&
connmanctl disable bluetooth ||
bluetoothctl power off
(( ${+commands[connmanctl]} )) &&
connmanctl disable bluetooth
else
bluetoothctl "$@"
fi