diff options
author | Steven Barth <steven@midlink.org> | 2008-08-26 00:53:28 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-26 00:53:28 +0000 |
commit | 0c5dc7bc77a4fd7d7f0d965e3185e2df4c608f05 (patch) | |
tree | b6a3a5fd860f43a171ebdb4446974489f4dbbb0b /libs/sys/luasrc/sys.lua | |
parent | 8e6d1e682afee81fb4199ad494195c23e4381af5 (diff) |
libs/core: Reworked some basic libraries to not use package.seeall
libs/json: Implemented own JSON-Decoder (Encoder will follow)
modules/rpc: Preliminary implemented RPC-Exports for luci.fs, luci.sys and luci.model.uci
Diffstat (limited to 'libs/sys/luasrc/sys.lua')
-rw-r--r-- | libs/sys/luasrc/sys.lua | 22 |
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) |