function f.handle(self, state, data)
if state == FORM_VALID then
if data.crons then
- luci.fs.writefile(cronfile, data.crons)
+ luci.fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
end
end
return true
end
-return f
\ No newline at end of file
+return f
end
function t.write(self, section, data)
- return luci.fs.writefile(ipkgfile, data)
+ return luci.fs.writefile(ipkgfile, data:gsub("\r\n", "\n"))
end
f:append(Template("admin_system/ipkg"))
function f.handle(self, state, data)
if state == FORM_VALID then
if data.keys then
- luci.fs.writefile(keyfile, data.keys)
+ luci.fs.writefile(keyfile, data.keys:gsub("\r\n", "\n"))
end
end
return true
end
-return f
\ No newline at end of file
+return f