summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-01-16 18:18:29 +0000
committerSteven Barth <steven@midlink.org>2009-01-16 18:18:29 +0000
commit4694bedd696c9a33116751bf8915f300632ea30c (patch)
tree523b156416dc871b4943b5751260fe740f015dda /modules/admin-full/luasrc
parent30ec22f84231924f7ac85d3c8d40024b9778c1c3 (diff)
Fix saving of ipkg configuration file
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua b/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua
index f161045a37..a93b4b0ea3 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua
@@ -22,14 +22,13 @@ function t.cfgvalue()
return luci.fs.readfile(ipkgfile) or ""
end
+function t.write(self, section, data)
+ return luci.fs.writefile(ipkgfile, data)
+end
+
f:append(Template("admin_system/ipkg"))
function f.handle(self, state, data)
- if state == FORM_VALID then
- if (luci.fs.readfile(ipkgfile) or "") ~= data.lines then
- luci.fs.writefile(ipkgfile, data.lines)
- end
- end
return true
end