summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-05 23:43:18 +0000
committerSteven Barth <steven@midlink.org>2008-09-05 23:43:18 +0000
commite6133d65e30775f91afdde32af54c47a54710c8c (patch)
treee04b19767c4eda493fc6ffd2921ebc811b0f8042 /applications
parent7f7a600b1235e8199a07451e25f5b03d63a51057 (diff)
Fixed a few FF-Wizard issues
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua3
-rw-r--r--applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua8
2 files changed, 9 insertions, 2 deletions
diff --git a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
index cd737c985..5245a92f1 100644
--- a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
+++ b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
@@ -141,8 +141,11 @@ function main.write(self, section, value)
-- Cleanup
+ luci.util.perror("1")
tools.wifi_delete_ifaces(device)
+ luci.util.perror("2")
tools.network_remove_interface(device)
+ luci.util.perror("3")
tools.firewall_zone_remove_interface("freifunk", device)
diff --git a/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua b/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
index d679cc93e..bb7cbb834 100644
--- a/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
+++ b/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
@@ -18,6 +18,7 @@ local uci = require "luci.model.uci"
local util = require "luci.util"
local table = require "table"
+local type = type
module "luci.tools.ffwizard"
@@ -39,11 +40,14 @@ function network_remove_interface(iface)
local aliases = {iface}
cursor:foreach("network", "alias",
function(section)
- table.insert(aliases, section[".name"])
+ if section.interface == iface then
+ table.insert(aliases, section[".name"])
+ end
end)
-- Delete Aliases and Routes
- cursor:delete_all("network", nil, {interface=iface})
+ cursor:delete_all("network", "route", {interface=iface})
+ cursor:delete_all("network", "alias", {interface=iface})
-- Delete DHCP sections
cursor:delete_all("dhcp", "dhcp",