FF-Wizard: Set interface protocol to static, don't add the zone to network if it...
[project/luci.git] / applications / luci-ffwizard-leipzig / luasrc / model / cbi / ffwizard.lua
index cd737c9..cdace2b 100644 (file)
@@ -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)
                
        
@@ -175,6 +178,7 @@ function main.write(self, section, value)
        
        -- Crate network interface
        local netconfig = _strip_internals(uci:get_all("freifunk", "interface"))
+       netconfig.proto = "static"
        netconfig.ipaddr = ip
        uci:section("network", "interface", device, netconfig)