Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

can_be_sta_and_ap() regexp fix #212

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ get_adapter_kernel_module() {
can_be_sta_and_ap() {
# iwconfig does not provide this information, assume false
[[ $USE_IWCONFIG -eq 1 ]] && return 1
get_adapter_info "$1" | grep -E '{.* managed.* AP.*}' > /dev/null 2>&1 && return 0
get_adapter_info "$1" | grep -E '{.* AP.* managed.*}' > /dev/null 2>&1 && return 0
get_adapter_info "$1" | sed -r 's/.*\{.* AP.*\} *<= *([0-9]*).*/\1/g' | sed -r 's/([0-9]*).*/\1/g' | awk '$1 > 1' | grep -E '[0-9*]' > /dev/null 2>&1 && return 0
return 1
}

Expand Down