projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Redesigned firmware upgrade process
[project/luci.git]
/
modules
/
admin-full
/
luasrc
/
controller
/
admin
/
system.lua
diff --git
a/modules/admin-full/luasrc/controller/admin/system.lua
b/modules/admin-full/luasrc/controller/admin/system.lua
index
5d64336
..
55087a0
100644
(file)
--- a/
modules/admin-full/luasrc/controller/admin/system.lua
+++ b/
modules/admin-full/luasrc/controller/admin/system.lua
@@
-182,7
+182,7
@@
end
function action_upgrade()
require("luci.model.uci")
function action_upgrade()
require("luci.model.uci")
- local ret
+ 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
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
@@
-208,12
+208,11
@@
function action_upgrade()
local keepcfg = keep_avail and luci.http.formvalue("keepcfg")
if plat and fname then
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
end
- luci.template.render("admin_system/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()
end
function _keep_pattern()