X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fsys%2Fluasrc%2Fsys.lua;h=bce4e8a62c12043642b2d0e22762fcac752a10c3;hb=0c5dc7bc77a4fd7d7f0d965e3185e2df4c608f05;hp=d0dc5acbd879a9ffda17e55763b361388555fbd8;hpb=8e6d1e682afee81fb4199ad494195c23e4381af5;p=project%2Fluci.git diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index d0dc5acbd..bce4e8a62 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)