[LEDE-DEV] Question about rpcd uci::state

Zefir Kurtisi zefir.kurtisi at neratec.com
Mon Mar 6 04:30:14 PST 2017


On 03/06/2017 01:15 PM, Jo-Philipp Wich wrote:
> Hi,
> 
>> the uci ubus service (part of rpcd) provides the method 'state' which from reading
>> the source code is expected to provide the current state of an option ignoring
>> pending changes.
> 
> No it is a method to provide access to the legacy concept of "state
> variables" which are epheramal uci values not backed by configuration
> files or pending changes.
> 
> State variables used to be required to reflect network runtime state in
> uci but the entire concept got faded out with the introduction of netifd
> and runtime information via ubus.
> 
> Some packages and legacy components still use state variables, so I
> decided to implement this facility in rpcd.
> 
Ok, thanks for the info, misinterpretation from my side.
> There currently is no way to query option values while ignoring the
> changes, but that should be easy to implement.
> 
Let's see how long it really takes... Started looking at it and what I see
non-trivial to solve is that UCI_SAVEDIR is added to the delta_path in
uci_alloc_context and there is no function provided to remove it. Any idea what
the best approach would be (without messing internal ctx list structures from the
ubus module or temporary renaming UCI_SAVEDIR)?

> 
> ~ Jo
> 
Thanks,
Zefir



More information about the Lede-dev mailing list