netmode: bring down wet interface in extender mode

This commit is contained in:
Anjan Chanda 2018-11-15 16:43:54 +01:00
parent 49a3984859
commit c3acd8cc63

View file

@ -104,9 +104,13 @@ correct_uplink() {
if [ "$link" == "up" ]; then if [ "$link" == "up" ]; then
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":true}" ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":true}"
ifconfig $WETIF down
echo ethernet > /tmp/netmodes/uplink_type
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":false}" ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":false}"
else else
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":false}" ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":false}"
ifconfig $WETIF up
echo wireless > /tmp/netmodes/uplink_type
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}" ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}"
ubus call led.internet set '{"state" : "notice"}' ubus call led.internet set '{"state" : "notice"}'
fi fi