inteno-netmodes: adapt to layer2 changes

This commit is contained in:
Sukru Senli 2017-12-29 19:30:06 +01:00
parent bc96e7a362
commit 1f9ba0a4fd
2 changed files with 4 additions and 2 deletions

View file

@ -235,6 +235,7 @@ switch_netmode() {
/etc/init.d/environment reload
case "$curmode" in
routed*)
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
ubus call uci commit '{"config":"network"}'
;;
repeater*)
@ -242,6 +243,7 @@ switch_netmode() {
/etc/init.d/omcproxy stop
fi
if [ "$netreload" != "0" ]; then
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
ubus call uci commit '{"config":"network"}'
fi
;;

View file

@ -251,7 +251,7 @@ uci commit wireless
if [ "$from_gui" == "true" ]; then
# check for connectivity
wifi reload
[ -f /etc/init.d/layer2_interface_ethernet -a -f /etc/config/layer2_interface_ethernet ] && /etc/init.d/layer2_interface_ethernet reload
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
i=$SLEEPTIME;
while [ $i -gt 0 ]; do
@ -283,6 +283,6 @@ else
# wifi reload
wifi reload
fi
[ -f /etc/init.d/layer2_interface_ethernet -a -f /etc/config/layer2_interface_ethernet ] && /etc/init.d/layer2_interface_ethernet reload
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
ubus call leds set '{"state":"normal"}'
fi