From 1159957dfc52a70d17eb5ce657dc083c9e513a2f Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Mon, 16 May 2016 13:17:29 +0200 Subject: [PATCH] gluon-luci-admin: Fix uploaded image validation The image validation currently fails on some devices (tested OpenMesh) because it isn't done via sysupgrade. But the checks depend partially on the integration in sysupgrade (e.g. via loops that can be stopped via "break statements"). Instead of hacking its own version check, it is easier and better tested to just use 'sysupgrade -T' like it is already done by LuCI. Signed-off-by: Sven Eckelmann --- .../files/usr/lib/lua/luci/controller/admin/upgrade.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua index 29aecb95..2365f02c 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua @@ -101,9 +101,7 @@ end function image_supported(tmpfile) -- XXX: yay... return ( 0 == os.execute( - ". /lib/functions.sh; " .. - "include /lib/upgrade; " .. - "platform_check_image %q >/dev/null" + "/sbin/sysupgrade -T %q >/dev/null" % tmpfile ) ) end