projects
/
openwrt
/
staging
/
nbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a1535
)
unetd: cli: add unet_create/unet_update hook calls
master
author
Felix Fietkau
<nbd@nbd.name>
Wed, 26 Feb 2025 09:41:48 +0000
(10:41 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Wed, 26 Feb 2025 09:41:50 +0000
(10:41 +0100)
Useful for upcoming cli modules that store created interfaces separately
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/unetd/files/unet.uc
patch
|
blob
|
history
diff --git
a/package/network/services/unetd/files/unet.uc
b/package/network/services/unetd/files/unet.uc
index b884e23f60dd4b7cb54cbe498a650062567866f7..b22d6e57dc5181236b346451ffce88fc6679083e 100644
(file)
--- a/
package/network/services/unetd/files/unet.uc
+++ b/
package/network/services/unetd/files/unet.uc
@@
-153,6
+153,7
@@
function network_sign_data(ctx, name, network, pw_file, upload)
function network_create_uci(name, iface)
{
+ model.run_hook("unet_create", name, iface);
let cur = uci.cursor();
cur.set("network", name, "interface");
for (let key, val in iface)
@@
-378,6
+379,7
@@
function network_iface_save(ctx)
if (!netdata.iface_changed)
return;
+ model.run_hook("unet_update", network, netdata.iface);
let cur = uci.cursor();
let iface_orig = cur.get_all("network", network);
for (let name, val in netdata.iface) {