create_ap

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

commit 984f8e7fc9ea41f82959203238593983b6f4f3fc
parent e8fd319aac713533b05e2303be9c31076ed11445
Author: oblique <psyberbits@gmail.com>
Date:   Sun Nov 24 18:37:39 +0200

If WiFi interface is already set to a channel, don't try to change it

Diffstat:
create_ap | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/create_ap b/create_ap @@ -208,6 +208,12 @@ fi WIFI_IFACE=$1 VWIFI_IFACE=${WIFI_IFACE}ap +WIFI_IFACE_CHANNEL=$(iw ${WIFI_IFACE} info | grep channel | awk '{print $2}') + +if [[ -n $WIFI_IFACE_CHANNEL && $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then + echo "hostapd will fail to use channel $CHANNEL because $WIFI_IFACE is already set to channel $WIFI_IFACE_CHANNEL, fallback to channel $WIFI_IFACE_CHANNEL." + CHANNEL=$WIFI_IFACE_CHANNEL +fi if [[ "$SHARE_METHOD" == "bridge" ]]; then BRIDGE_IFACE=$(get_avail_bridge)