@@ -12,7 +12,7 @@
BOARD="$(uci get board.model.name)"
. /etc/network.$BOARD
-if ! uci get network.$SWITCHDEV.ifname; then
+if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then
SWITCHHW=$(swconfig list | awk '{ print $4 }')
@@ -62,10 +62,9 @@ if ! uci get network.$SWITCHDEV.ifname; then
fi
uci commit
- /etc/init.d/network restart
fi
-if [ "$ONE_PORT" = "YES" ]; then
+if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FORCEPARSE" = '1' ] ) ; then
uci set network.$SWITCHDEV=interface
uci set network.$SWITCHDEV.ifname=$SWITCHDEV
if [ "$ETHMODE" = "WAN" ]; then
@@ -97,9 +96,10 @@ if [ "$ONE_PORT" = "YES" ]; then
ETH0MAC="w2ap"
fi
uci commit
- /etc/init.d/network restart
fi
+/etc/init.d/network restart
+
if [[ -n "$ETHMESHMAC" ]]; then
if uci get network.ethmesh.macaddr
then