X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fcontroller%2Fadmin%2Fsystem.lua;h=5d6037151e711aa6098269c61ead21a53f62ba15;hp=5d64336e03ee7192b0a695de78ff7d0e443108f2;hb=4538b12895af0f95bfd728de53391ceaa895dd08;hpb=72927597bc3c5a5817225dcb20cfe406e1c1bac5 diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index 5d64336e0..5d6037151 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -185,9 +185,7 @@ function action_upgrade() 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 - - local keep_avail = not broadcom + local keep_avail = true local file luci.http.setfilehandler( @@ -213,6 +211,7 @@ function action_upgrade() end end + luci.http.prepare_content("text/html") luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) end @@ -221,8 +220,10 @@ function _keep_pattern() local files = luci.model.uci.cursor():get_all("luci", "flash_keep") if files then kpattern = "" - for k,v in pairs(files) do - kpattern = kpattern .. " " .. v + for k, v in pairs(files) do + if k:sub(1,1) ~= "." and luci.fs.glob(v) then + kpattern = kpattern .. " " .. v + end end end return kpattern