1、在system.lua中找到:
entry({"admin", "system", "flashops"}, call("action_flashops"), _("Backup / Flash Firmware"), 70)
对应函数
function action_flashops()里有:
local upgrade_avail = nixio.fs.access("/lib/upgrade/platform.sh"),注意platform.sh
从页面查找,当升级失败,有信息:
The uploaded image file.......
找对应flashops.htm里有:
<% if image_invalid then %>
<div class="cbi-section-error"><%:The uploaded image file ....%></div>
<% end %>
可以知道关键在if 语句里的image_invalid
回到system.lua,有:
if step == 1 then
if image_supported() then
luci.template.render("admin_system/upgrade", {