model.uci.Cursor:set_list(cfg,sect,opt,list) returns true when it doesn't do anything
See original GitHub issueon both BB & CC:
luci.model.uci.Cursor:set_list returns true even when it doesn’t succeed. If the config file doesn’t exist, set_list returns false, but if the file exists, but the section doesn’t, it returns true without doing anything. Likewise with commit and save.
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)
> uci = require("luci.model.uci")
> ucic = uci.cursor()
> bsl = ucic:set_list("blah", "some_section", "some_option", { 1,2,3})
> =bsl
false
> bsl2 = ucic:set_list("remake", "some_section", "some_option", {1,2,3})
> =bsl2
true
> =ucic:save("remake")
true
> =ucic:commit("remake")
true
>
Config files themselves:
root@eg-02D455:~# uci show remake # blank file, but exists
root@eg-02D455:~# uci show blah # file doesn't exist.
uci: Entry not found
root@eg-02D455:~#
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Object Instance luci.model.uci
Get a boolean option and return it's value as true or false. Cursor:get_confdir (), Get the configuration directory. Cursor:get_first (config, type, option, ...
Read more >Crawford Hall, Irvine, CA, USA Concert Setlists
Located on the campus of the University of California, Irvine. Also known as UCI Crawford Hall. Oct ...
Read more >[OpenWrt Wiki] The UCI system
List staged changes to the given configuration file or if none given, all configuration files. Add an anonymous section of type section-type to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@karlp - will be fixed by the same rpcd updates though:
confirmed this is fixed in 1806 era and later after the rpcd fixes.