ipaddr=$(uci get meshwizard.netconfig.$net\_ip4addr)
[ -z "$ipaddr" ] && msg_missing_value meshwizard $net\_ip4addr
-
[ -z "$interface_netmask" ] && interface netmask="255.255.0.0"
uci batch << EOF
set network.$netrenamed.dns="$interface_dns"
EOF
-echo " IP address: $ipaddr"
-echo " Netmask : $interface_netmask"
+uci_commitverbose "Setup interface $netrenamed" network
# setup dhcp alias/interface
# Setup alias for $net
if [ "$vap" == 1 ]; then
- echo " + Setup interface ${netrenamed}dhcp."
uci set network.${netrenamed}dhcp=interface
else
- echo " + Setup alias interface ${netrenamed}dhcp."
uci set network.${netrenamed}dhcp=alias
uci set network.${netrenamed}dhcp.interface="$netrenamed"
fi
set network.${netrenamed}dhcp.netmask="$NETMASK"
EOF
- echo " interface: $net
- ipaddr: $START
- netmask: $NETMASK"
-
fi
-uci commit
+uci_commitverbose "Setup interface for ${netrenamed}dhcp" network