UCI config migration across OpenWrt releases

Thibaut hacks at slashdirt.org
Sat Apr 18 00:32:46 PDT 2026



> Le 17 avr. 2026 à 17:05, Eric via openwrt-devel <openwrt-devel at lists.openwrt.org> a écrit :
> 
> Every image has all of its /etc/uci-defaults/* files in place, so whenever
> you run 'sysupgrade ...' to install an image, you get the new set of uci
> default scripts (this is how upgrades actually "upgrade" the defaults).
> 
> Your step 2 above has all of the uci-defaults scripts ready to run, which
> happens on reboot, and then the "preserve config" restore happens after
> that and overwrites some of the files that were just created (for example,
> the default wireless config is created from defaults and then overwritten
> by the restore).

In fact it’s the other way around. Configs are restored very early on after the kernel is loaded (in preinit stage) - and thus before the shipped uci-defaults are run - which is exactly why user configs can be migrated as needed.

T.


More information about the openwrt-devel mailing list