X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fwizard.sh;h=f6b227dceb3e32c0353219f267c3451730162424;hb=6574b8147c8067c6f2df124557f58bd10b18aaae;hp=73eddc4dfa2809137417286a8800e1ac97491ac0;hpb=c123f7299f882e2e24c1fc8677bf7896145dddb0;p=project%2Fluci.git diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh index 73eddc4df..f6b227dce 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh @@ -9,15 +9,16 @@ # You may not use this file except in compliance with the License. # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -. /etc/functions.sh +. /lib/functions.sh echo " -/* Meshwizard 0.0.4 */ +/* Meshwizard 0.0.8 */ " # config export dir="/usr/bin/meshwizard" . $dir/functions.sh +[ -f /proc/net/ipv6_route ] && export has_ipv6=1 # Check which packages we have installed export has_luci=FALSE @@ -58,19 +59,32 @@ $dir/helpers/setup_dnsmasq.sh $dir/helpers/setup_system.sh $dir/helpers/setup_olsrd.sh $dir/helpers/setup_firewall.sh +$dir/helpers/setup_ssh.sh if [ "$wan_proto" == "static" ] && [ -n "$wan_ip4addr" ] && [ -n "$wan_netmask" ]; then $dir/helpers/setup_wan_static.sh fi +if [ "$wan_proto" == "dhcp" ]; then + $dir/helpers/setup_wan_dhcp.sh +fi + if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask" ]; then $dir/helpers/setup_lan_static.sh fi +if [ "$profile_ipv6" == 1 ] && [ "$has_ipv6" = 1 ]; then + $dir/helpers/setup_lan_ipv6.sh + # Setup auto-ipv6 + if [ -n "$(echo "$profile_ipv6_config" |grep auto-ipv6)" ]; then + $dir/helpers/setup_auto-ipv6.sh + fi +fi + # Setup policyrouting if internet sharing is disabled and wan is not used for olsrd # Always disable it first to make sure its disabled when the user decied to share his internet uci set freifunk-policyrouting.pr.enable=0 -if [ ! "$sharenet" == 1 ] && [ ! "$(uci -q get meshwizard.netconfig.wan_proto)" == "olsr" ]; then +if [ ! "$general_sharenet" == 1 ] && [ ! "$(uci -q get meshwizard.netconfig.wan_proto)" == "olsr" ]; then $dir/helpers/setup_policyrouting.sh fi @@ -92,8 +106,14 @@ for net in $networks; do $dir/helpers/setup_splash.sh $net $dir/helpers/setup_firewall_interface.sh $net + + if [ -n "$(echo "$profile_ipv6_config" |grep auto-ipv6)" ]; then + $dir/helpers/setup_auto-ipv6-interface.sh $net + fi done ##### Reboot the router (because simply restarting services gave errors) +echo "+ The wizard has finished and the router will reboot now." + reboot