fix again

This commit is contained in:
Christian Dresel 2021-01-01 10:08:55 +01:00
parent 495db7f257
commit 896bf3e8f1

View File

@ -32,13 +32,13 @@ asknew() {
json_get_var ip ip json_get_var ip ip
uci set fff.autol3.ipv6address=$ip uci set fff.autol3.ipv6address=$ip
uci set fff.autol3.ipv6assigner=$assigner uci set fff.autol3.ipv6assigner=$assigner
uci set fff.autol3.autoconfigl3=1
uci commit fff uci commit fff
uci del gateway.@client[0].ip6addr uci del gateway.@client[0].ip6addr
uci add_list gateway.@client[0].ip6addr=$ip uci add_list gateway.@client[0].ip6addr=$ip
uci commit gateway uci commit gateway
yes | configure-layer3 -c # call canusethis that assigner know we use the ipv6
configure-layer3 -a canusethis
exit;
} }
canusethis() { canusethis() {
@ -55,10 +55,10 @@ canusethis() {
fi 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 if [ -n $(uci -q get fff.autol3.ipv6address) ] ; then
canusethis canusethis
fi fi
if [ -n $(uci -q get fff.autol3) ] && [ -z $(uci -q get fff.autol3.ipv6address) ] ; then
asknew
fi