X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fwizard.sh;h=450473868e7a8ca4d18025701f61465f11729d19;hp=b666313e460e2a538eed8d8a10f3adfcf07c8953;hb=2cb780c8cc9dce4a3867f6ecb8611be0954d71ef;hpb=d447b7e9f27c05c9f091c95a296a04126234d16d diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh index b666313e4..450473868 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh @@ -10,7 +10,7 @@ # 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 @@ -34,13 +34,15 @@ cleanup=$(uci -q get meshwizard.general.cleanup) # 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) @@ -114,6 +116,13 @@ for net in $networks; do $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