# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
echo "
-/* Meshwizard 0.3.0 */
+/* Meshwizard 0.3.1 */
"
# config
# Rename wifi interfaces
$dir/helpers/rename-wifi.sh
+export lan_is_olsr="$(uci -q get meshwizard.netconfig.lan_config)"
+
# Get community
community="$(uci -q get meshwizard.community.name || uci -q get freifunk.community.name)"
[ -z "$community" ] && echo "Error: Community is not set in /etc/config/freifunk, aborting now." && exit 1
export community="$community"
# we need a list of widgets later on. It will be populated in read_defaults.sh
-local widgets=""
+widgets=""
# Get a list of networks we need to setup
networks=$(uci show meshwizard.netconfig | grep -v "netconfig=" | sed -e 's/meshwizard.netconfig\.\(.*\)\_.*/\1/' |sort|uniq)
$dir/helpers/setup_olsrd_interface.sh $net
net_dhcp=$(uci -q get meshwizard.netconfig.${net}_dhcp)
+ export ${net}_dhcp=$net_dhcp
+
+ if [ "$net" = "lan" ] && [ "$lan_is_olsr" = "1" ]; then
+ uci -q set dhcp.lan.ignore="1"
+ uci_commitverbose "Disable DHCP on LAN because it is an olsr interface." dhcp
+ fi
+
if [ "$net_dhcp" == 1 ]; then
$dir/helpers/setup_dhcp.sh $net
fi