subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
451 views 0 comments
by anonymous

I would like to store in a persistent environment variable the current state of the relay DOUT2 ( get DOUT2).

As I want to retrieve the value even after a reboot, I suppose that this variable shall be defined in /etc/profile.

But does the content of /etc/profile preserve during an upgrade of the firmware ? I suppose no.

I also suppose that I cannot declare /etc/profile in the /etc/sysupgrade.conf file because you could add variables in a new version.

Thenceforth where I could store this variable ?

Note that I am not a linux expert ...

Thank you by advance

1 Answer

0 votes
by anonymous


Regarding the firmware update:

 - If firmware update would be done "without keeping any settings", all previous information in the router would be erased.

 - If firmware update would be done with "keep all settings", all information from the router would still be erased, apart from "/etc/config" directory (i.e. so that router would have new functionality, just with old configuration)

Therefore, in your case, it would be best to create your own file in "/etc/config" directory and store your desired information in this file.