Skip to content

Commit

Permalink
Properly restrict nmcli switching to wifi, wwan
Browse files Browse the repository at this point in the history
  • Loading branch information
linrunner committed Apr 25, 2024
1 parent 1c6804c commit f05f565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion func.d/30-tlp-func-rf-sw
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ device_switch () { # switch radio type state
[ -n "$3" ] && [ -n "$4" ] && [ "$1" != "bluetooth" ] && \
set_timed_lock "$3" "$4"

if check_nm && [ "$1" != "bluetooth" ] && [ "$_rfkdev" = "1" ]; then
if check_nm && wordinlist "$1" "wifi wwan" && [ "$_rfkdev" = "1" ]; then
# switch device with NetworkManager
case "$newst" in
1) invoke_nmcli "$1" on ;;
Expand Down

0 comments on commit f05f565

Please sign in to comment.