Closed karlp closed 6 years ago
The code returns as expected, returning the name of the section, but no section is created.
good case, followed by bad case
# lua Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32) > lm = require("luci.model.uci") > c = lm.cursor() > data = {somekey = "textvalue", otherkey = 9876 } > name1 = "nospaces" > =c:section("someconfig", "sometype", name1, data) nospaces > =c:save("someconfig") true > =c:commit("someconfig") true nil > >>>> at this point we cat the config file, and see the "nospaces" section exists > name2 = "now with spaces" > =c:section("someconfig", "sometype", name2, data) now with spaces > =c:save("someconfig") true > =c:commit("someconfig") true nil >
# cat /etc/config/someconfig config blah option wop 'dedo' config sometype 'nospaces' option otherkey '9876' option somekey 'textvalue'
Note that the "now with spaces" section is never created.
Preliminary fixes pushed to https://git.openwrt.org/?p=project/rpcd.git;a=summary - will update the rpcd package tomorrow after some more testing.
This is now fixed on 1806 branch based as well as master, thanks!
The code returns as expected, returning the name of the section, but no section is created.
good case, followed by bad case
Note that the "now with spaces" section is never created.