Uci-defaults network setting

base-files / etc / uci-defaults I want to change network settings.
network. @ switch_vlan [1] .vid = 1
I would like to add.
What should I do?

Current setting value

ucidef_set_interfaces_lan_wan eth0.1 "" eth0.2 "
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "0t 2 4"
ucidef_add_switch_vlan "switch0" "2" "0t 1 3 6"

Easiest (for me) is to add the /etc/config/network that you want to ./files/etc/config/network in your build directory. Anything in ./files/ gets added to the ROM image at build time.

I want to change the factory reset value.
I know I want to change the value of / etc / config / network.

Factory reset will revert to the ROM value. If you supply your own /etc/config/network that will be the result of "firstboot" reset.

The initialization scripts, as far as I know, only get called when there is nothing present at all.

Hello Jeff,
Did you mean, /packages/base-files/files/etc ?

I could not find /config/network under that.

Is your problem solved ? How did you do it ?

The base-files package contains the "core" files, not the configuration files. The configuration files on the overlay are generated when they don't exist. I was talking of custom files in your image, such as described at


1 Like

It worked, and is the most easy way to do. Thanks.

1 Like