meshwizard: ipv6 fixes, fix uhttpd setup
[oweals/luci.git] / contrib / package / meshwizard / files / usr / bin / meshwizard / helpers / setup_network.sh
index 8c909e2d5fc497387f1f88eb889a673efef05681..325475fa6ebffcf9acc815ea4e42898748478cf1 100755 (executable)
@@ -26,12 +26,12 @@ EOF
 
 # Setup IPv6 for the interface
 local ip6addr
-if [ "$profile_ipv6" = 1 ]; then
-       if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
+if [ "$ipv6_enabled" = 1 ]; then
+       if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
                ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $netrenamed)"
                uci set network.$netrenamed.ip6addr="${ip6addr}/112"
        fi
-       if [ "$profile_ipv6_config" = "static" ] && [ -n "$ip6addr" ]; then
+       if [ "$ipv6_config" = "static" ] && [ -n "$ip6addr" ]; then
                uci set network.$netrenamed.ip6addr="$ip6addr"
        fi
 fi