From f1d568dd3c8d770d0fd2e00dc82d3f994e22dbc6 Mon Sep 17 00:00:00 2001 From: cnjhb Date: Sat, 19 Mar 2022 09:11:50 +0800 Subject: [PATCH] Fix FREQ_BAND for config files --- src/scripts/create_ap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripts/create_ap b/src/scripts/create_ap index 8a9939f..1f6fb5e 100755 --- a/src/scripts/create_ap +++ b/src/scripts/create_ap @@ -1030,6 +1030,11 @@ read_config() { # Read switches and their values opt_name="${line%%=*}" opt_val="${line#*=}" + + if [[ $opt_name == "FREQ_BAND" ]] ; then + FREQ_BAND_SET=1 + fi + if is_config_opt "$opt_name" ; then eval $opt_name="\$opt_val" else @@ -1041,6 +1046,8 @@ read_config() { ARGS=( "$@" ) +FREQ_BAND_SET=0 + # Preprocessing for --config before option-parsing starts for ((i=0; i<$#; i++)); do if [[ "${ARGS[i]}" = "--config" ]]; then @@ -1059,8 +1066,6 @@ GETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l "help","hidden","hostapd-debug:","hosta [[ $? -ne 0 ]] && exit 1 eval set -- "$GETOPT_ARGS" -FREQ_BAND_SET=0 - while :; do case "$1" in -h|--help)