|
|
|
@ -153,6 +153,7 @@ function network_sign_data(ctx, name, network, pw_file, upload)
|
|
|
|
|
|
|
|
|
|
function network_create_uci(model, name, iface)
|
|
|
|
|
{
|
|
|
|
|
model.run_hook("unet_create", name, iface);
|
|
|
|
|
let cur = uci.cursor(null, null, "");
|
|
|
|
|
cur.set("network", name, "interface");
|
|
|
|
|
for (let key, val in iface)
|
|
|
|
@ -361,6 +362,7 @@ function network_create(ctx, argv, named) {
|
|
|
|
|
function network_delete(ctx, argv) {
|
|
|
|
|
let name = argv[0];
|
|
|
|
|
let cur = uci.cursor(null, null, "");
|
|
|
|
|
model.run_hook("unet_delete", name);
|
|
|
|
|
if (!cur.delete("network", name))
|
|
|
|
|
return ctx.command_failed("Command failed");
|
|
|
|
|
|
|
|
|
@ -378,6 +380,7 @@ function network_iface_save(ctx)
|
|
|
|
|
if (!netdata.iface_changed)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
model.run_hook("unet_update", network, netdata.iface);
|
|
|
|
|
let cur = uci.cursor(null, null, "");
|
|
|
|
|
let iface_orig = cur.get_all("network", network);
|
|
|
|
|
for (let name, val in netdata.iface) {
|
|
|
|
|