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

Zefir Kurtisi zefir.kurtisi at neratec.com
Mon Mar 6 04:09:17 PST 2017


Hi Jo, all,

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. At my side it does not (shows the same as 'get'):

> root at LEDE:~# ubus call uci get '{"config":"system", "section":"system", "option":"hostname"}'
> {
> 	"value": "LEDE"
> }
> root at LEDE:~# ubus call uci set '{"config":"system", "section":"system", "values":{"hostname":"FOO"}}'
> root at LEDE:~# ubus call uci get '{"config":"system", "section":"system", "option":"hostname"}'
> {
> 	"value": "FOO"
> }
> root at LEDE:~# ubus call uci state '{"config":"system", "section":"system", "option":"hostname"}'
> {
> 	"value": "FOO"
> }

The relevant core packages used are at 17.01 and I don't see something relevant
changed since then, so I believe it should also fail with current HEAD.

Is there something obvious I am missing to get it running? Does this feature
require working with sessions?


Thanks,
Zefir



More information about the Lede-dev mailing list