Unconsistant behaviour when saving files in overlay

Hello everyone,

I am building an openwrt firmware for an old mt7620 board for commercial purpose (captive portal)

I am encountering a strange behaviour when I try to save updated config files. I am trying to figure out the reason.

If someone have an idea or have already seen such a situation, this is an example of what happens :

From the console, I go to the /overlay/upper/etc/config:

- Before reboot
     - If I modify the existing "network" file (from the firmware compilation)
     - I delete another file i.e. "dropbear" (from the firmware compilation too)
     - I create a new file for example "test"
     - I create a folder "new_folder" with a file inside

- After reboot:
     - changes in the existing "network" file are not kept
     - "dropbear" file reappeared
     - The new file for example "test" is still there
     - "new_folder" with its file inside are still there

- Finally :
     - if I delete the new files "test" and "new_folder", after the reboot they are effectively deleted

I imagine that, may be there, is an issue with the overlay folder that only "see" the new files created but not the one from the compilation.

Thank you by advance,

Best Regards

Hello every one,
I am still trying to figure out the problem but I noticed that :

If I make a firmware without UCI, when I mofify the files in /etc/config/, changes made manually are kept after reboot, except 'wireless' which revert to its initial state.
It seems like some process involving UCI at startup use the original files and not the edited ones.

I took a look to the .sh scripts in /etc/init.d, /etc/rc.d, lib/config, lib/functions, lib/preinit... to see what is going on but its still not clear when and where config files are processed (even after looking at topics on the subject)

If someone have an idea, it would help a lot.

Thanks by advance.


Hello Everyone,

I managed to compile another firmware based on LEDE 17.01 to see if there are benefits. Unfortunately, I still have the same problem concerning the files in the /etc/config which always revert to their default value.

Is there a way to turn this behaviour off, or is it a kind of 'protection' towards something that could be seen as 'currupted' ?

Note : I know that this version is old too and some people recommend to upgrade it.
But, In regards to my constraints, I tried to update to openwrt versions >= 18.06. Each time I have kernel panics even by compiling with the adjustments I made that work with the previous versions.

So, I am stuck with it for instance, I prefer having one problem at a time.

Thanks by advance