[luci] Where to put parameters for a LuCI application

Christian Schoenebeck christian.schoenebeck at gmail.com
Fri Aug 15 09:46:02 CEST 2014


Am 14.08.2014 um 22:45 schrieb Jo-Philipp Wich:
> On 14.08.2014 22:06, Christian Schoenebeck wrote:
>> Hi,
>>
>> I'm currently working on rewriting ddns-scripts including a new luci-app-ddns.
>> I want to use some uci parameters to show different information inside luci app depending on these settings.
>> i.e. show time of last update or to show time until next update.
> 
> That sounds like something you do not want to store in /etc/config/ -
> that would imply a flash write whenever there's some DDNS update, same
> for any other kind of runtime information.
> 
> You can use luci.model.uci.cursor_state() to instantiate an uci context
> that refers to /var/state/ which resides in the ramdisk.
> 
> Any :set() operation will write into /var/state/configname, any :get()
> operation first parses /var/state/configname, then
> /etc/config/configname, this way non-persistent values are overlayed
> over the static configuration files.
> 
> ~ Jow
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci
> 
Seems to be a misunderstanding.

I would like to save for "permanent" inside configuration for next use of the front end.
Like you set language or theme for luci, I like to store infos for luci-app-ddns

That's why I ask. Into which configuration file to store this info's to ??




More information about the luci mailing list