mirror of https://github.com/openwrt/luci.git
luci-mod-admin-full: use sysupgrade -T to test images
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>pull/316/head
parent
eb1ef783f6
commit
9feb1b8a78
|
@ -178,13 +178,7 @@ function action_flashops()
|
||||||
local image_tmp = "/tmp/firmware.img"
|
local image_tmp = "/tmp/firmware.img"
|
||||||
|
|
||||||
local function image_supported()
|
local function image_supported()
|
||||||
-- XXX: yay...
|
return (os.execute("sysupgrade -T %q >/dev/null" % image_tmp) == 0)
|
||||||
return ( 0 == os.execute(
|
|
||||||
". /lib/functions.sh; " ..
|
|
||||||
"include /lib/upgrade; " ..
|
|
||||||
"platform_check_image %q >/dev/null"
|
|
||||||
% image_tmp
|
|
||||||
) )
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function image_checksum()
|
local function image_checksum()
|
||||||
|
|
Loading…
Reference in New Issue