From 9feb1b8a7828cd025cb3bf8a0e58085cf1da64ca Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 24 Jan 2015 14:26:51 +0100 Subject: [PATCH] luci-mod-admin-full: use sysupgrade -T to test images Signed-off-by: Jo-Philipp Wich --- modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 8 +------- 1 file changed, 1 insertion(+), 7 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 055142b53..52e347d07 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -178,13 +178,7 @@ function action_flashops() local image_tmp = "/tmp/firmware.img" local function image_supported() - -- XXX: yay... - return ( 0 == os.execute( - ". /lib/functions.sh; " .. - "include /lib/upgrade; " .. - "platform_check_image %q >/dev/null" - % image_tmp - ) ) + return (os.execute("sysupgrade -T %q >/dev/null" % image_tmp) == 0) end local function image_checksum() -- 2.11.0