Commit 469806e7 authored by sokai's avatar sokai

hot-fix for APs with more than one interfaces its name starts with 'wlan' = v160125-bf

parent bd83dbfe
......@@ -18,12 +18,12 @@ START=99
EXTRA_COMMANDS="status update upgrade"
## script
SCRIPTVERSION='160123-bf'
SCRIPTVERSION='160125-bf'
SCRIPT=${SCRIPTPATH}${SCRIPTNAME}
CRONTAB='/var/spool/cron/crontabs/root'
CRONINTERVAL=$(head -30 /dev/urandom | tr -dc "0123456789" | head -c2) # run cron hourly at a random minute
WIF=$(ifconfig | awk '/10\.22\.[0-9]{1,3}\.[0-9]{1,3}/ {print $1}' RS="\n\n" | grep wlan) # http://stackoverflow.com/a/18344694/338049
WIF=$(ifconfig | awk '/10\.22\.[0-9]{1,3}\.[0-9]{1,3}/ {print $1}' RS="\n\n" | grep -m 1 wlan) # http://stackoverflow.com/a/18344694/338049
#WIFI= uci show = wireless.@wifi-iface[0].ifname=wlan0-adhoc-2
HOSTNAME=$(uci show system|grep -i hostname|cut -d '=' -f2|sed 's/ /%20/g')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment