1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
3 -- Licensed to the public under the Apache License 2.0.
5 local ipkgfile = "/etc/opkg.conf"
7 f = SimpleForm("ipkgconf", translate("OPKG-Configuration"))
9 f:append(Template("admin_system/ipkg"))
11 t = f:field(TextValue, "lines")
14 return nixio.fs.readfile(ipkgfile) or ""
17 function t.write(self, section, data)
18 return nixio.fs.writefile(ipkgfile, data:gsub("\r\n", "\n"))
21 function f.handle(self, state, data)