applications/luci-radvd: fix removal of section in overview page
This commit is contained in:
parent
b1b2e79afe
commit
43a72918db
1 changed files with 10 additions and 8 deletions
|
@ -36,16 +36,18 @@ function s.create(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function s.remove(self, section)
|
function s.remove(self, section)
|
||||||
local iface = m.uci:get("radvd", section, "interface")
|
if m.uci:get("radvd", section) == "interface" then
|
||||||
if iface then
|
local iface = m.uci:get("radvd", section, "interface")
|
||||||
m.uci:delete_all("radvd", "prefix",
|
if iface then
|
||||||
function(s) return s.interface == iface end)
|
m.uci:delete_all("radvd", "prefix",
|
||||||
|
function(s) return s.interface == iface end)
|
||||||
|
|
||||||
m.uci:delete_all("radvd", "route",
|
m.uci:delete_all("radvd", "route",
|
||||||
function(s) return s.interface == iface end)
|
function(s) return s.interface == iface end)
|
||||||
|
|
||||||
m.uci:delete_all("radvd", "rdnss",
|
m.uci:delete_all("radvd", "rdnss",
|
||||||
function(s) return s.interface == iface end)
|
function(s) return s.interface == iface end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return TypedSection.remove(self, section)
|
return TypedSection.remove(self, section)
|
||||||
|
|
Loading…
Reference in a new issue