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
|
||||
(( ${+commands[connmanctl]} )) &&
|
||||
connmanctl enable bluetooth ||
|
||||
bluetoothctl power on
|
||||
connmanctl enable bluetooth && sleep 0.5
|
||||
bluetoothctl power on
|
||||
elif [[ $1 == off ]]; then
|
||||
bluetoothctl power off
|
||||
(( ${+commands[connmanctl]} )) &&
|
||||
connmanctl disable bluetooth ||
|
||||
bluetoothctl power off
|
||||
connmanctl disable bluetooth
|
||||
else
|
||||
bluetoothctl "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue