From: Manuel Munz Date: Wed, 27 Jun 2012 16:13:56 +0000 (+0000) Subject: contrib/meshwizard: check if ipv6 is available on the system X-Git-Tag: 0.11.0~563 X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=b6cd0f852b431ea9a32353e7c091928ddfba0317 contrib/meshwizard: check if ipv6 is available on the system --- diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh index 8c9088f07..859d5ff6b 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh @@ -12,12 +12,13 @@ . /lib/functions.sh echo " -/* Meshwizard 0.0.7 */ +/* Meshwizard 0.0.8 */ " # config export dir="/usr/bin/meshwizard" . $dir/functions.sh +[ -f /proc/net/ipv6_route ] && has_ipv6=1 # Check which packages we have installed export has_luci=FALSE @@ -67,7 +68,7 @@ if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask" $dir/helpers/setup_lan_static.sh fi -if [ "$profile_ipv6" == 1 ]; then +if [ "$profile_ipv6" == 1 ] && [ "$has_ipv6" = 1 ]; then $dir/helpers/setup_lan_ipv6.sh # Setup auto-ipv6 if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then @@ -101,7 +102,7 @@ for net in $networks; do $dir/helpers/setup_splash.sh $net $dir/helpers/setup_firewall_interface.sh $net - if [ "$profile_ipv6" == 1 ]; then + if [ "$profile_ipv6" == 1 ] && [ "$has_ipv6" = 1 ]; then $dir/helpers/setup_radvd_interface.sh $net fi done