1 -- ------ network configuration ------ --
3 ut = require "luci.util"
5 networkConfig = "/etc/config/network"
8 m5 = SimpleForm("networkconf", nil)
9 m5:append(Template("mwan/advanced_networkconfig")) -- highlight current tab
12 f = m5:section(SimpleSection, nil,
13 translate("This section allows you to modify the contents of /etc/config/network"))
15 t = f:option(TextValue, "lines")
20 return nixio.fs.readfile(networkConfig) or ""
23 function t.write(self, section, data) -- format and write new data to script
24 return nixio.fs.writefile(networkConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n")
27 function f.handle(self, state, data)