X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fcontroller%2Fadmin%2Fsystem.lua;h=5d64336e03ee7192b0a695de78ff7d0e443108f2;hb=2bbc4eb3c33c3590433174c599ec9418bdb8f38a;hp=55087a01774d7b5414a21da2f45f468ec5683fd9;hpb=65b0a2bfad5f24b851a14ab0a405e60f24321bdf;p=project%2Fluci.git diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index 55087a0177..5d64336e03 100644 --- 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") - local ret, err + local ret 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,11 +208,12 @@ function action_upgrade() local keepcfg = keep_avail and luci.http.formvalue("keepcfg") if plat and fname then - ret, err = luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) + ret = function() + return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) + end end - luci.template.render("admin_system/upgrade", {sysupgrade=plat, - ret=ret, err=err, keep_avail=keep_avail}) + luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) end function _keep_pattern()