Developing lightweight computation at the DSG edge

Commit 055a596a authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Inclusió dels commits del TP-Link TL-WR841ND que no es van integrar amb...

Inclusió dels commits del TP-Link TL-WR841ND que no es van integrar amb testing i van desaparèixer en eliminar la branca v1
parent 643736fb
......@@ -23,12 +23,16 @@ uci add network switch_vlan > /dev/null
uci set network.@switch[0]=switch
uci set network.@switch[0].name=switch0
uci set network.@switch[0].reset=1
uci set network.@switch[0].enable_vlan=1
uci set network.@switch_vlan[0]=switch_vlan
uci set network.@switch_vlan[0].device=switch0
uci set network.@switch_vlan[0].vlan=1
uci set network.@switch_vlan[0].vid=1
uci set network.@switch_vlan[0].ports="0 1 2 3 4"
uci set network.@switch[0].enable_vlan=0
# The following lines have to be commented, otherwise the VLAN inteface
# switch0.1 appears as a regular interface in the configuration wizard
#uci set network.@switch_vlan[0]=switch_vlan
#uci set network.@switch_vlan[0].device=switch0
#uci set network.@switch_vlan[0].vlan=1
#uci set network.@switch_vlan[0].vid=1
#uci set network.@switch_vlan[0].ports="0 1 2 3 4"
uci commit network
}
#!/bin/sh
# Stage = [birth|firstboot|anyboot|preconf|postconf]
STAGE="$1"
[ "$STAGE" == "firstboot" ] && {
echo "Configuring TP-Link TL-WR-series device networking"
iseth=0
devs="$(uci get qmp.interfaces.lan_devices) \
$(uci get qmp.interfaces.wan_devices) \
$(uci get qmp.interfaces.mesh_devices) \
$(uci get qmp.interfaces.ignore_devices)"
for d in $devs
do
[ "$d" == "eth0" ] && iseth=1 && break
done
[ $iseth -eq 0 ] && {
echo "Device eth0 not configured, doing it..."
uci set qmp.interfaces.lan_devices="eth1"
uci set qmp.interfaces.mesh_devices="eth0 eth1"
uci set qmp.interfaces.wan_devices="eth0"
uci commit qmp
}
}
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