create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit 2bb20536f7c5ba65a9ddaf0f2cc107ac4a7e2698
parent fff2242c96c6d37eee64d7307fbc3c48a9d50892
Author: graysky <graysky@archlinux.us>
Date:   Sun, 21 Jun 2015 09:21:38 -0400

quote vars to allow for spaces in SSID or password

Diffstat:
Mcreate_ap | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/create_ap b/create_ap @@ -917,12 +917,12 @@ write_config() { WIFI_IFACE=$1 if [[ "$SHARE_METHOD" == "none" ]]; then - SSID=$2 - PASSPHRASE=$3 + SSID="$2" + PASSPHRASE="$3" else - INTERNET_IFACE=$2 - SSID=$3 - PASSPHRASE=$4 + INTERNET_IFACE="$2" + SSID="$3" + PASSPHRASE="$4" fi for config_opt in "${CONFIG_OPTS[@]}"; do @@ -1266,16 +1266,16 @@ if [[ $# -gt $MIN_REQUIRED_ARGS ]]; then usage >&2 exit 1 fi - INTERNET_IFACE=$2 - SSID=$3 - PASSPHRASE=$4 + INTERNET_IFACE="$2" + SSID="$3" + PASSPHRASE="$4" else if [[ $# -ne 2 && $# -ne 3 ]]; then usage >&2 exit 1 fi - SSID=$2 - PASSPHRASE=$3 + SSID="$2" + PASSPHRASE="$3" fi else if [[ "$SHARE_METHOD" != "none" ]]; then @@ -1283,7 +1283,7 @@ else usage >&2 exit 1 fi - INTERNET_IFACE=$2 + INTERNET_IFACE="$2" fi if tty -s; then while :; do