Config files after upgrade

I want to preserve some configuration files after upgrade, and want to install new ones with my new firmware.

I know sysupgrade.conf, and I know that if I put files to the build directory under files/ it will be put to the image. I also know the uci-defaults folder.

The question is which is the order files are overwritten/executed after upgrade?

  1. files are copied to the filesystem from the files folder
  2. uci-defaults executed
  3. config files overwritten from the previous installation

Any other sequence?


One "gotcha" to be aware of is that the process copies executables from the "old" file system into a memory-backed file system. It typically "just works", but if you've messes around with busybox options and/or replaced the expected applets with other software (such as the "stand-alone" versions) you might have some surprises.

/etc/sysupgrade.conf will impact the process. The files expected to be preserved/overwritten can be seen with sysupgrade -l (ell)

To my knowledge, the order is:

Thaks, that helps a lot!