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=1afdfc55ef2928c1c686b1937223ee22aecf5ac9;hp=5d64336e03ee7192b0a695de78ff7d0e443108f2;hb=8815b6a7dd24a481606db03c5980bc310709a103;hpb=72927597bc3c5a5817225dcb20cfe406e1c1bac5 diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index 5d64336e0..1afdfc55e 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -17,7 +17,7 @@ function index() luci.i18n.loadc("admin-core") local i18n = luci.i18n.translate - entry({"admin", "system"}, alias("admin", "system", "system"), i18n("system"), 30) + entry({"admin", "system"}, alias("admin", "system", "system"), i18n("system"), 30).index = true entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("system"), 1) entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages"), 10) entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg"), i18n("a_s_p_ipkg")) @@ -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