summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
commit8fcd841aa9af96c8a4a4d3c1a555d2d1ed42332c (patch)
treecf6466b373236442e63742cb4f73b22579940784 /modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
parent6abba6163290b58cd9ebae98d8459ac38ef52a4b (diff)
convert luci.fs users to nixio.fs api
Diffstat (limited to 'modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua b/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
index 521e0a27d..05442dd55 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
@@ -12,6 +12,8 @@ You may obtain a copy of the License at
$Id$
]]--
+
+local fs = require "nixio.fs"
local cronfile = "/etc/crontabs/root"
f = SimpleForm("crontab", translate("a_s_crontab"), translate("a_s_crontab1"))
@@ -20,13 +22,13 @@ t = f:field(TextValue, "crons")
t.rmempty = true
t.rows = 10
function t.cfgvalue()
- return luci.fs.readfile(cronfile) or ""
+ return fs.readfile(cronfile) or ""
end
function f.handle(self, state, data)
if state == FORM_VALID then
if data.crons then
- luci.fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
+ fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
end
end
return true