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 055142b53e67..52e347d07b6d 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()