我不能通过lua创建一个命名的UCI部分。使用命令行的等效值是
uci set uhttpd.test=uhttpd
uci commit,它提供一个配置文件,如
config uhttpd 'test'我不能用set或add再现命令行的语法。C 来源似乎说要添加传递类型。
local uci = require "uci"
uci.add("uhttpd", "test") -- adds anonymous section
uci.set("uhttpd", "test", "listen_http", "0.0.0.0:81") -- not added as named section missing
uci.commit("uhttpd")发布于 2016-10-08 01:01:24
维基:
Add new section "name" with type "type":
x:set("config", "name", "type")
-- real world example:
x:set("network", "wan6", "interface")https://stackoverflow.com/questions/39844185
复制相似问题