mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Merge pull request #237 from cnjhb/master
Fix FREQ_BAND for config files
This commit is contained in:
commit
6afde1771c
@ -1030,6 +1030,11 @@ read_config() {
|
|||||||
# Read switches and their values
|
# Read switches and their values
|
||||||
opt_name="${line%%=*}"
|
opt_name="${line%%=*}"
|
||||||
opt_val="${line#*=}"
|
opt_val="${line#*=}"
|
||||||
|
|
||||||
|
if [[ $opt_name == "FREQ_BAND" ]] ; then
|
||||||
|
FREQ_BAND_SET=1
|
||||||
|
fi
|
||||||
|
|
||||||
if is_config_opt "$opt_name" ; then
|
if is_config_opt "$opt_name" ; then
|
||||||
eval $opt_name="\$opt_val"
|
eval $opt_name="\$opt_val"
|
||||||
else
|
else
|
||||||
@ -1041,6 +1046,8 @@ read_config() {
|
|||||||
|
|
||||||
ARGS=( "$@" )
|
ARGS=( "$@" )
|
||||||
|
|
||||||
|
FREQ_BAND_SET=0
|
||||||
|
|
||||||
# Preprocessing for --config before option-parsing starts
|
# Preprocessing for --config before option-parsing starts
|
||||||
for ((i=0; i<$#; i++)); do
|
for ((i=0; i<$#; i++)); do
|
||||||
if [[ "${ARGS[i]}" = "--config" ]]; then
|
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
|
[[ $? -ne 0 ]] && exit 1
|
||||||
eval set -- "$GETOPT_ARGS"
|
eval set -- "$GETOPT_ARGS"
|
||||||
|
|
||||||
FREQ_BAND_SET=0
|
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
|
Loading…
Reference in New Issue
Block a user