Merging configuration over the upgrade

Hi Team

have an AP runs with 15.0.2 opewrt Version, currenlty using swupgrade utility to upgrade Images either by using -c or -n based on retain or replacing the configuration.
I am thinking of merging the configrution over the upgrade , means adding /deleting/creating new options or new files under /etc/config over the upgrade. Do we have support of these in openwrt ..?
'
Im new to openwrt.

Configuration files are not supposed to be compatible, specially with such a log gap. I would download those files to a PC, and use them as a base to configure after the upgrade.

3 Likes

You can automate the configuration management with SSH, shell and UCI:
https://openwrt.org/docs/guide-user/base-system/uci

It should also be possible to manage OpenWrt with Ansible:
https://github.com/gekmihesg/ansible-openwrt

I understand simple UCI commands can solve it over the upgrade. As part of upgrade, finding a mechanism to merge the configs, this helps to work on files /etc/config if there is a change required. so looking for long term run.

For ex: Before upgrade

config interface 'lan'
option ifname 'eth0 eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.110.1'
optino netmask '255.255.255.0'
option igmp_snooping '0'

After upgrade:

config interface 'lan'
option ifname 'eth0 eth1'
option force_link '1'
option type 'bridge'
option proto 'dhcp'
option igmp_snooping '1'

This is a weird example, because the only way you can merge static and dynamic configurations is by creating an alias.

yes I just gave this as an example.. similary in ssid section in /etc/config/wireless.. and some options in /etc/config/system and /etc/config/dhcp.. so looking for a common to be run (auto-interlligence) to solve this..

How is it supposed to know whether you want dynamic or static configuration, both or none?
Hiring a network administrator wold be cheaper than building and deploying that sort of AI.

1 Like