How to change network config after flashing with uci-defaults?

It seems uci-defaults that changes network config gets overridden after flashing the image for the first time.

My guess is that network config is auto-generated at a later time, after uci-defaults executes. I wonder is there a way to make certain uci-defaults script run after network config auto-generation?

My guess is that you have some error in the uci-default setup in buildroot that you have built the firmware with that result in a failed load of the uci-default or you have remade the source code a lot.

Or you have tried some non standard changes in a already installed firmware?


You are correct, my uci-default contains error.

I wonder what's the correct way to create a list with uci batch? uci show gives something like:

network.wan.dns='' ''

So I assumed this should work, but it doesn't

set network.wan.dns='' ''

I didn't know you could force it to generate, that will come in handy, thanks a lot!

I use:

add_list network.wan.dns=''
add_list network.wan.dns=''
1 Like

Thanks. If I want to ensure the list contains only the values I listed, should I delete the option first?

You can, but I don’t think they would be populated on first boot. At most, I disable the ISP DNS servers from DHCP (peerdns), then add the ones I prefer.

set network.wan.peerdns='0'
add_list network.wan.dns=''
add_list network.wan.dns=''

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.