mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-28 06:39:08 +00:00
unetd: cli: bypass override directory
Useful for better integration with uconfig, which overrides uci with generated files Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
960e1c4c24
commit
5f54aa602e
@ -153,7 +153,7 @@ function network_sign_data(ctx, name, network, pw_file, upload)
|
|||||||
|
|
||||||
function network_create_uci(model, name, iface)
|
function network_create_uci(model, name, iface)
|
||||||
{
|
{
|
||||||
let cur = uci.cursor();
|
let cur = uci.cursor(null, null, "");
|
||||||
cur.set("network", name, "interface");
|
cur.set("network", name, "interface");
|
||||||
for (let key, val in iface)
|
for (let key, val in iface)
|
||||||
cur.set("network", name, key, val);
|
cur.set("network", name, key, val);
|
||||||
@ -360,7 +360,7 @@ function network_create(ctx, argv, named) {
|
|||||||
|
|
||||||
function network_delete(ctx, argv) {
|
function network_delete(ctx, argv) {
|
||||||
let name = argv[0];
|
let name = argv[0];
|
||||||
let cur = uci.cursor();
|
let cur = uci.cursor(null, null, "");
|
||||||
if (!cur.delete("network", name))
|
if (!cur.delete("network", name))
|
||||||
return ctx.command_failed("Command failed");
|
return ctx.command_failed("Command failed");
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ function network_iface_save(ctx)
|
|||||||
if (!netdata.iface_changed)
|
if (!netdata.iface_changed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let cur = uci.cursor();
|
let cur = uci.cursor(null, null, "");
|
||||||
let iface_orig = cur.get_all("network", network);
|
let iface_orig = cur.get_all("network", network);
|
||||||
for (let name, val in netdata.iface) {
|
for (let name, val in netdata.iface) {
|
||||||
if (iface_orig[name] == val)
|
if (iface_orig[name] == val)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user