diff --git a/src/packages/fff/fff-autol3/files/usr/lib/autol3.d/10-ipv6.sh b/src/packages/fff/fff-autol3/files/usr/lib/autol3.d/10-ipv6.sh index 7b48cbd0..25903819 100755 --- a/src/packages/fff/fff-autol3/files/usr/lib/autol3.d/10-ipv6.sh +++ b/src/packages/fff/fff-autol3/files/usr/lib/autol3.d/10-ipv6.sh @@ -32,13 +32,13 @@ asknew() { json_get_var ip ip uci set fff.autol3.ipv6address=$ip uci set fff.autol3.ipv6assigner=$assigner + uci set fff.autol3.autoconfigl3=1 uci commit fff uci del gateway.@client[0].ip6addr uci add_list gateway.@client[0].ip6addr=$ip uci commit gateway - yes | configure-layer3 -c - configure-layer3 -a - exit; + # call canusethis that assigner know we use the ipv6 + canusethis } canusethis() { @@ -55,10 +55,10 @@ canusethis() { fi } -if [ -n $(uci -q get fff.autol3) ] && [ -z $(uci -q get fff.autol3.ipv6address) ] ; then - asknew -fi - if [ -n $(uci -q get fff.autol3.ipv6address) ] ; then canusethis fi + +if [ -n $(uci -q get fff.autol3) ] && [ -z $(uci -q get fff.autol3.ipv6address) ] ; then + asknew +fi