diff options
author | Steven Barth <steven@midlink.org> | 2008-04-08 19:15:11 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-04-08 19:15:11 +0000 |
commit | 30ca47c27a5e0fd4dd4538523d5ee5f16282494e (patch) | |
tree | fd368a0b4cda6c73fbe9f6c9793487aaa7939d36 /src/ffluci/sys.lua | |
parent | f341dfe91a766003a9333725e88823e2866fb3c8 (diff) |
* Completed Firmware-Upgrade page
* Added Dnsmasq configuration page
Diffstat (limited to 'src/ffluci/sys.lua')
-rw-r--r-- | src/ffluci/sys.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ffluci/sys.lua b/src/ffluci/sys.lua index 367d41e8c1..d8fbaa57a0 100644 --- a/src/ffluci/sys.lua +++ b/src/ffluci/sys.lua @@ -52,6 +52,17 @@ function execl(command) return data end +-- Uses "ffluci-flash" to flash a new image file to the system +function flash(image, kpattern) + local cmd = "ffluci-flash " + if kpattern then + cmd = cmd .. "-k '" .. kapttern:gsub("'", "") .. "' " + end + cmd = cmd .. "'" .. image:gsub("'", "") .. "'" + + return os.execute(cmd) +end + -- Returns the hostname function hostname() return io.lines("/proc/sys/kernel/hostname")() |