diff options
Diffstat (limited to 'modules/admin-full/luasrc/controller')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/services.lua | 6 | ||||
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/system.lua | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/services.lua b/modules/admin-full/luasrc/controller/admin/services.lua index a137377b39..50c79f6643 100644 --- a/modules/admin-full/luasrc/controller/admin/services.lua +++ b/modules/admin-full/luasrc/controller/admin/services.lua @@ -28,14 +28,14 @@ function index() page.order = 40 page.index = true - if luci.fs.access("/etc/config/lucittpd") then + if nixio.fs.access("/etc/config/lucittpd") then local page = node("admin", "services", "lucittpd") page.target = cbi("admin_services/lucittpd") page.title = "LuCIttpd" page.order = 10 end - if luci.fs.access("/etc/config/httpd") then + if nixio.fs.access("/etc/config/httpd") then local page = node("admin", "services", "httpd") page.target = cbi("admin_services/httpd") page.title = "Busybox HTTPd" @@ -51,4 +51,4 @@ function index() page.target = cbi("admin_services/dnsmasq") page.title = "Dnsmasq" page.order = 30 -end
\ No newline at end of file +end diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index 1aabe637a1..c90ecc3ce9 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -27,7 +27,7 @@ function index() entry({"admin", "system", "processes"}, form("admin_system/processes"), i18n("process_head"), 45) entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab"), 50) - if luci.fs.isdirectory("/sys/class/leds") then + if nixio.fs.access("/sys/class/leds") then entry({"admin", "system", "leds"}, cbi("admin_system/leds"), i18n("leds", "LEDs"), 60) end @@ -124,7 +124,7 @@ function action_packages() -- Remove index cache if changes then - luci.fs.unlink("/tmp/luci-indexcache") + nixio.fs.unlink("/tmp/luci-indexcache") end end @@ -214,7 +214,7 @@ function action_upgrade() local function storage_size() local size = 0 - if luci.fs.access("/proc/mtd") then + if nixio.fs.access("/proc/mtd") then for l in io.lines("/proc/mtd") do local d, s, e, n = l:match('^([^%s]+)%s+([^%s]+)%s+([^%s]+)%s+"([^%s]+)"') if n == "linux" then @@ -222,7 +222,7 @@ function action_upgrade() break end end - elseif luci.fs.access("/proc/partitions") then + elseif nixio.fs.access("/proc/partitions") then for l in io.lines("/proc/partitions") do local x, y, b, n = l:match('^%s*(%d+)%s+(%d+)%s+([^%s]+)%s+([^%s]+)') if b and n and not n:match('[0-9]') then @@ -239,7 +239,7 @@ function action_upgrade() local file luci.http.setfilehandler( function(meta, chunk, eof) - if not luci.fs.access(tmpfile) and not file and chunk and #chunk > 0 then + if not nixio.fs.access(tmpfile) and not file and chunk and #chunk > 0 then file = io.open(tmpfile, "w") end if file and chunk then @@ -255,9 +255,9 @@ function action_upgrade() -- Determine state local keep_avail = true local step = tonumber(luci.http.formvalue("step") or 1) - local has_image = luci.fs.access(tmpfile) + local has_image = nixio.fs.access(tmpfile) local has_support = image_supported() - local has_platform = luci.fs.access("/lib/upgrade/platform.sh") + local has_platform = nixio.fs.access("/lib/upgrade/platform.sh") local has_upload = luci.http.formvalue("image") -- This does the actual flashing which is invoked inside an iframe @@ -298,7 +298,7 @@ function action_upgrade() -- If there is an image but user has requested step 1 -- or type is not supported, then remove it. if has_image then - luci.fs.unlink(tmpfile) + nixio.fs.unlink(tmpfile) end luci.template.render("admin_system/upgrade", { @@ -313,7 +313,7 @@ function action_upgrade() luci.template.render("admin_system/upgrade", { step=2, checksum=image_checksum(), - filesize=luci.fs.stat(tmpfile).size, + filesize=nixio.fs.stat(tmpfile).size, flashsize=storage_size(), keepconfig=(keep_avail and luci.http.formvalue("keepcfg") == "1") } ) @@ -333,7 +333,7 @@ function _keep_pattern() if files then kpattern = "" for k, v in pairs(files) do - if k:sub(1,1) ~= "." and luci.fs.glob(v) then + if k:sub(1,1) ~= "." and nixio.fs.glob(v)() then kpattern = kpattern .. " " .. v end end |