diff options
author | Steven Barth <steven@midlink.org> | 2008-09-12 11:53:08 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-12 11:53:08 +0000 |
commit | fade8edd2dfe39ae579256d04220aba9da2ff074 (patch) | |
tree | 79a61b456ee239333b4e8adbd5ce4223d32780b0 /modules/admin-mini/luasrc/controller | |
parent | e0cfb49235b5890b24dbfcafeb5c7805327d6403 (diff) |
Redesigned firmware upgrade process
Diffstat (limited to 'modules/admin-mini/luasrc/controller')
-rw-r--r-- | modules/admin-mini/luasrc/controller/mini/system.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index 6d16ef865..d68283cc6 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -79,7 +79,7 @@ end function action_upgrade() require("luci.model.uci") - local ret = nil + local ret, err local plat = luci.fs.mtime("/lib/upgrade/platform.sh") local tmpfile = "/tmp/firmware.img" local broadcom = os.execute('grep brcm_ /lib/upgrade/platform.sh >/dev/null 2>&1') == 0 @@ -105,12 +105,11 @@ function action_upgrade() local keepcfg = keep_avail and luci.http.formvalue("keepcfg") if plat and fname then - ret = function() - return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) - end + ret, err = luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) end - luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) + luci.template.render("admin_system/upgrade", {sysupgrade=plat, + ret=ret, err=err, keep_avail=keep_avail}) end function _keep_pattern() |