When using DHCP on WAN side, uci -q get network.wan.ipaddr is empty and uci -qp /tmp/state get network.wan.ipaddr has to be used instead. But this can have timing problems so I inverted the test logic and went with uci -q get network.lan.ipaddr which I think is permanently set.
When using DHCP on WAN side,
uci -q get network.wan.ipaddr
is empty anduci -qp /tmp/state get network.wan.ipaddr
has to be used instead. But this can have timing problems so I inverted the test logic and went withuci -q get network.lan.ipaddr
which I think is permanently set.Happy new year!