<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ -%> <%+header%>

<%:system%>

<%:a_s_flash%>

<%:a_s_flash_upgrade1%>


<% if next(blocks) and not next(flash) then %>
<%:a_s_flash_fwimage%>:
<% for name, v in pairs(blocks) do %> <%=name%>:
<% end %>
<% if keep_avail then -%> <%:a_s_flash_keepcfg%> <% end -%>
<% elseif next(flash) then %>

<%:a_s_flash_received%>

<% reboot.exec = false for i, entry in ipairs(flash) do local name, func = entry.name, entry.func %> <%:a_s_flash_inprogress%> <%=name%>... <%=string.rep(" ", 32*1024)%> <% local stat, code = func() reboot.exec = reboot.exec or stat if stat and code then %> <%:ok%>
<% else %> <%:a_s_flash_flasherr%>! (<%:code%> <%=code%>)
<% end %> <% if reboot.exec then %>
<%:a_s_flash_flashed%>
<% end %> <% end %> <% else %>
<%:a_s_flash_notimplemented%>
<% end %> <%+footer%>