diff options
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua index fd6dda1c80..cf8cfb5d2d 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -185,6 +185,10 @@ local function image_checksum(image) 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 @@ -268,6 +272,7 @@ function action_sysupgrade() 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")) |