Fix kernel panick when turning off bluetooth
This commit is contained in:
parent
6aa3ee0a29
commit
ff585c576d
|
@ -3,12 +3,12 @@ bt() {
|
||||||
|
|
||||||
if [[ $1 == on ]]; then
|
if [[ $1 == on ]]; then
|
||||||
(( ${+commands[connmanctl]} )) &&
|
(( ${+commands[connmanctl]} )) &&
|
||||||
connmanctl enable bluetooth ||
|
connmanctl enable bluetooth && sleep 0.5
|
||||||
bluetoothctl power on
|
bluetoothctl power on
|
||||||
elif [[ $1 == off ]]; then
|
elif [[ $1 == off ]]; then
|
||||||
|
bluetoothctl power off
|
||||||
(( ${+commands[connmanctl]} )) &&
|
(( ${+commands[connmanctl]} )) &&
|
||||||
connmanctl disable bluetooth ||
|
connmanctl disable bluetooth
|
||||||
bluetoothctl power off
|
|
||||||
else
|
else
|
||||||
bluetoothctl "$@"
|
bluetoothctl "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue