From a54b1945c407b7fecaae8aac57fa3338eb11a3bc Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 18 Sep 2008 21:45:01 +0000 Subject: Revert mtdow --- .../luasrc/view/admin_system/upgrade.htm | 37 ++++++++-------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'modules/admin-full/luasrc/view') diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm index 8fe658a427..a3d97d6497 100644 --- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -17,13 +17,12 @@ $Id$

<%:a_s_flash%>

<%:a_s_flash_upgrade1%>


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

<% if keep_avail then -%> @@ -34,28 +33,20 @@ $Id$
-<% elseif next(flash) then %> +<% elseif ret then %>

<%:a_s_flash_received%>

+

<%:a_s_flash_inprogress%>

- <% 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 %> + + <% %> + <% local ret = ret() + if ret == 0 then %> +
<%:a_s_flash_flashed%>
+ <% else %> +
<%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)
<% end %> <% else %>
<%:a_s_flash_notimplemented%>
<% end %> -<%+footer%> \ No newline at end of file +<%+footer%> +<% if ret == 0 then luci.sys.reboot() end %> -- cgit v1.2.3