return (luci.sys.exec("md5sum %q" % image):match("^([^%s]+)"))
end
+local function image_sha256_checksum(image)
+ return (luci.sys.exec("sha256sum %q" % image):match("^([^%s]+)"))
+end
+
local function supports_sysupgrade()
return nixio.fs.access("/lib/upgrade/platform.sh")
end
if image_supported(image_tmp) then
luci.template.render("admin_system/upgrade", {
checksum = image_checksum(image_tmp),
+ sha256ch = image_sha256_checksum(image_tmp),
storage = storage_size(),
size = (fs.stat(image_tmp, "size") or 0),
keep = (not not http.formvalue("keep"))
<fieldset class="cbi-section">
<ul>
- <li><%:Checksum%>: <code><%=checksum%></code></li>
+ <li><%:Checksum MD5%>: <code><%=checksum%></code></li>
+ <li><%:Checksum SHA256%>: <code><%=sha256ch%></code></li>
<li><%:Size%>: <%
local w = require "luci.tools.webadmin"
write(w.byte_format(size))