quote vars to allow for spaces in SSID or password
This commit is contained in:
parent
fff2242c96
commit
2bb20536f7
22
create_ap
22
create_ap
@ -917,12 +917,12 @@ write_config() {
|
|||||||
|
|
||||||
WIFI_IFACE=$1
|
WIFI_IFACE=$1
|
||||||
if [[ "$SHARE_METHOD" == "none" ]]; then
|
if [[ "$SHARE_METHOD" == "none" ]]; then
|
||||||
SSID=$2
|
SSID="$2"
|
||||||
PASSPHRASE=$3
|
PASSPHRASE="$3"
|
||||||
else
|
else
|
||||||
INTERNET_IFACE=$2
|
INTERNET_IFACE="$2"
|
||||||
SSID=$3
|
SSID="$3"
|
||||||
PASSPHRASE=$4
|
PASSPHRASE="$4"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for config_opt in "${CONFIG_OPTS[@]}"; do
|
for config_opt in "${CONFIG_OPTS[@]}"; do
|
||||||
@ -1266,16 +1266,16 @@ if [[ $# -gt $MIN_REQUIRED_ARGS ]]; then
|
|||||||
usage >&2
|
usage >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
INTERNET_IFACE=$2
|
INTERNET_IFACE="$2"
|
||||||
SSID=$3
|
SSID="$3"
|
||||||
PASSPHRASE=$4
|
PASSPHRASE="$4"
|
||||||
else
|
else
|
||||||
if [[ $# -ne 2 && $# -ne 3 ]]; then
|
if [[ $# -ne 2 && $# -ne 3 ]]; then
|
||||||
usage >&2
|
usage >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
SSID=$2
|
SSID="$2"
|
||||||
PASSPHRASE=$3
|
PASSPHRASE="$3"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$SHARE_METHOD" != "none" ]]; then
|
if [[ "$SHARE_METHOD" != "none" ]]; then
|
||||||
@ -1283,7 +1283,7 @@ else
|
|||||||
usage >&2
|
usage >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
INTERNET_IFACE=$2
|
INTERNET_IFACE="$2"
|
||||||
fi
|
fi
|
||||||
if tty -s; then
|
if tty -s; then
|
||||||
while :; do
|
while :; do
|
||||||
|
Loading…
Reference in New Issue
Block a user