summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-03-02 12:23:55 +0100
committerJo-Philipp Wich <jo@mein.io>2018-03-02 12:44:35 +0100
commit852ec6e28bf90d67882cf909b15a91ecc4501b55 (patch)
tree36a2179301d9fd8dde1ac70003eb73a91b0a2739 /modules/luci-base/luasrc/model
parent3e17668adb1c583600fe1c488a438577f7957def (diff)
luci-base, luci-mod-admin-full: store backup vars in luci configuration
Keep the ifname and bridge state backup variables in /etc/config/luci to not pollute /etc/config/network. Fixes #1655. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/model')
-rw-r--r--modules/luci-base/luasrc/model/network.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua
index 9ea8e369d..3521c6d57 100644
--- a/modules/luci-base/luasrc/model/network.lua
+++ b/modules/luci-base/luasrc/model/network.lua
@@ -543,6 +543,9 @@ end
function del_network(self, n)
local r = _uci:delete("network", n)
if r then
+ _uci:delete_all("luci", "ifstate",
+ function(s) return (s.interface == n) end)
+
_uci:delete_all("network", "alias",
function(s) return (s.interface == n) end)