TeamT wrote:Working on a project where I would like to retain the current configuration when I flash the router with a new firmware, except for a specific config file which I would like to replace. I know that it's possible to add files in sysupgrade.conf to preserve them. But are there a way to force specific config files to be replaced?
1)
Use a uci-defaults script file that removes / replaces the one specific file (at the first boot after the flash).
So,
sysupgrade would preserve also the one unwanted file, but you would remove/overwrite it via a script at the first boot.
The uci-defaults script itself gets deleted after running once, so there is no remnants left for possible subsequent reboots.
https://wiki.openwrt.org/doc/uci#uci-defaults
2)
second option is that you manually replace the one config file just before the sysupgrade, so that the new file gets included in the sysupgrade archive.
(Last edited by hnyman on 28 Nov 2017, 11:54)