inteno-netmode: remove repeater ready flag on public ip

This commit is contained in:
Reidar Cederqvist 2017-05-03 14:38:28 +02:00
parent 4ce6f49284
commit fb648dbec9

View file

@ -31,6 +31,12 @@ set_disabled() {
test_ip() {
if [ -n "$(echo $ip | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ]; then
set_disabled 1
[ "$1" -eq "1" ] && {
uci set netmode.setup.repeaterready=0
uci commit netmode
local pid="$(ps | grep wificontro[l] | awk '/repeater/ {print $1}')"
[ "$pid" != "" ] && kill $pid
}
else
set_disabled 0
fi
@ -38,6 +44,6 @@ test_ip() {
case "$(uci -q get netmode.setup.curmode)" in
repeater*) test_ip ;;
*) [ "$(uci -q get netmode.setup.repeaterready)" == "1" ] && test_ip ;;
*) [ "$(uci -q get netmode.setup.repeaterready)" == "1" ] && test_ip 1;;
esac