summaryrefslogtreecommitdiffhomepage
path: root/libs/sys
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sys')
-rw-r--r--libs/sys/luasrc/sys.lua22
1 files changed, 17 insertions, 5 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index d0dc5acbd8..bce4e8a62c 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -24,14 +24,26 @@ limitations under the License.
]]--
+
+local io = require "io"
+local os = require "os"
+local posix = require "posix"
+local table = require "table"
+
+local luci = {}
+luci.util = require "luci.util"
+luci.fs = require "luci.fs"
+luci.ip = require "luci.ip"
+
+local tonumber, ipairs, pairs = tonumber, ipairs, pairs
+
+
--- LuCI Linux and POSIX system utilities.
-module("luci.sys", package.seeall)
-require("posix")
-require("luci.util")
-require("luci.fs")
-require("luci.ip")
+module "luci.sys"
+
--- Invoke the luci-flash executable to write an image to the flash memory.
+-- @param image Local path or URL to image file
-- @param kpattern Pattern of files to keep over flash process
-- @return Return value of os.execute()
function flash(image, kpattern)